mobile.html 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta
  6. name="viewport"
  7. content="width=device-width,user-scalable=no,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0"
  8. />
  9. <meta http-equiv="X-UA-Compatible" content="ie=edge" />
  10. <meta content="telephone=no" name="format-detection" />
  11. <link rel="stylesheet" href="css/h5-index.css" />
  12. </head>
  13. <body>
  14. <header class="logo-wrapper">
  15. <img src="img/h5-logo1.png" alt="" />
  16. </header>
  17. <section class="app-slogan">
  18. <img src="img/h5-slogan.png" alt="" onclick="return false;" />
  19. </section>
  20. <section class="app-dowload">
  21. <a class="download" href="javascript:;">点击下载</a>
  22. </section>
  23. <section class="show-image">
  24. <img src="img/h5-foot.png" alt="" onclick="return false;" />
  25. </section>
  26. <div class="wx-down"><img src="img/wx_down.png" alt="" /></div>
  27. <footer>
  28. <img src="" alt="" onclick="return false;" />版权所有 &copy;
  29. 北京暖光科技有限公司
  30. </footer>
  31. <script src="js/flexible.min.js"></script>
  32. <script src="https://cdn.bootcss.com/zepto/1.2.0/zepto.js"></script>
  33. <script src="https://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
  34. <script>
  35. $.ajax({
  36. url: "https://api-admin.shuoshuo.art/share/sign",
  37. data: {
  38. url: location.href
  39. },
  40. type: "POST",
  41. dataType: "text",
  42. success: function(res, status, xhr) {
  43. let returnDate = eval("(" + res + ")");
  44. if (returnDate.errno === 0) {
  45. let config = {
  46. title: "说说官网",
  47. desc: "发条说说,不再孤单",
  48. link: "https://www.shuoshuo.art",
  49. imgUrl: "https://www.shuoshuo.art/img/h5-logo.png"
  50. };
  51. wx.config({
  52. debug: false,
  53. appId: returnDate.data.app_id,
  54. timestamp: returnDate.data.timestamp,
  55. nonceStr: returnDate.data.noncestr,
  56. signature: returnDate.data.signature,
  57. jsApiList: ["updateAppMessageShareData", "onMenuShareAppMessage"]
  58. });
  59. wx.ready(() => {
  60. wx.updateAppMessageShareData({
  61. title: "说说官网", // 分享标题
  62. desc: "发条说说,不再孤单", // 分享描述
  63. link: "https://www.shuoshuo.art", // 分享链接
  64. imgUrl: "https://www.shuoshuo.art/img/h5-logo.png" // 分享图标
  65. });
  66. wx.onMenuShareAppMessage(config);
  67. });
  68. }
  69. },
  70. error: function(er) {
  71. console.log("error+" + er);
  72. }
  73. });
  74. </script>
  75. <script>
  76. $(function() {
  77. let BaseUrl = "https://api-admin.shuoshuo.art";
  78. let BaseDownloadAndroid =
  79. "http://shuoshuo-img.oss-cn-beijing.aliyuncs.com/apk/shuoshuo.apk?t=" +
  80. new Date().getTime();
  81. let _ = {
  82. GetRequest: () => {
  83. let url = location.search; //获取url中"?"符后的字串
  84. let theRequest = new Object();
  85. if (url.indexOf("?") != -1) {
  86. let str = url.substr(1);
  87. strs = str.split("&");
  88. for (let i = 0; i < strs.length; i++) {
  89. theRequest[strs[i].split("=")[0]] = unescape(
  90. strs[i].split("=")[1]
  91. );
  92. }
  93. }
  94. return theRequest;
  95. },
  96. post: data => {
  97. $.ajax({
  98. url: BaseUrl + "/stat/index",
  99. type: "post",
  100. data: {
  101. source: data
  102. }
  103. });
  104. }
  105. };
  106. let param = _.GetRequest();
  107. let statStr = "";
  108. // 埋点统计,短信来源
  109. // if (param['source'] && ['A', 'B', 'C'].includes(param['source'])) {
  110. // if (navigator.userAgent.indexOf('iPhone')>-1 || navigator.userAgent.indexOf('iPad')>-1){
  111. // $('.download')[0].setAttribute('href', 'https://itunes.apple.com/cn/app/%E8%AF%B4%E8%AF%B4-%E5%9C%A8%E7%BA%BF%E9%99%AA%E4%BC%B4%E8%81%8A%E5%A4%A9%E4%BA%A4%E5%8F%8B/id1454088662')
  112. // statStr = param['source'] + '_ios_' + 'view'
  113. // _.post(statStr)
  114. // $('.download').on('click', function() {
  115. // statStr = param['source'] + '_ios_' + 'click';
  116. // _.post(statStr);
  117. // })
  118. // } else {
  119. // $('.download')[0].setAttribute('href', 'http://shuoshuo-img.oss-cn-beijing.aliyuncs.com/apk/shuoshuo_v1.1.3.sms.apk')
  120. // statStr = param['source'] + '_android_' + 'view'
  121. // _.post(statStr)
  122. // $('.download').on('click', function() {
  123. // statStr = param['source'] + '_android' + 'click';
  124. // _.post(statStr);
  125. // if (navigator.userAgent.indexOf('MicroMessenger')>-1) {
  126. // $('.wx-down').show();
  127. // // 遮罩层禁止页面滚动
  128. // document.addEventListener('touchmove', function (event) {
  129. // event.preventDefault();
  130. // })
  131. // return false;
  132. // }
  133. // })
  134. // }
  135. // xby来源
  136. if (param.hasOwnProperty("fromurl")) {
  137. if (param["fromurl"] === "xby1") {
  138. if (
  139. navigator.userAgent.indexOf("iPhone") > -1 ||
  140. navigator.userAgent.indexOf("iPad") > -1
  141. ) {
  142. $(".download")[0].setAttribute(
  143. "href",
  144. "https://itunes.apple.com/cn/app/%E8%AF%B4%E8%AF%B4-%E5%9C%A8%E7%BA%BF%E9%99%AA%E4%BC%B4%E8%81%8A%E5%A4%A9%E4%BA%A4%E5%8F%8B/id1454088662"
  145. );
  146. } else {
  147. $(".download")[0].setAttribute(
  148. "href",
  149. "https://shuoshuo-img.oss-cn-beijing.aliyuncs.com/apk/shuoshuo.xuebuyuan.apk"
  150. );
  151. $(".download").on("click", function() {
  152. if (navigator.userAgent.indexOf("MicroMessenger") > -1) {
  153. $(".wx-down").show();
  154. // 遮罩层禁止页面滚动
  155. document.addEventListener("touchmove", function(event) {
  156. event.preventDefault();
  157. });
  158. return false;
  159. }
  160. });
  161. }
  162. }
  163. } else {
  164. if (
  165. navigator.userAgent.indexOf("iPhone") > -1 ||
  166. navigator.userAgent.indexOf("iPad") > -1
  167. ) {
  168. $(".download")[0].setAttribute(
  169. "href",
  170. "https://itunes.apple.com/cn/app/%E8%AF%B4%E8%AF%B4-%E5%9C%A8%E7%BA%BF%E9%99%AA%E4%BC%B4%E8%81%8A%E5%A4%A9%E4%BA%A4%E5%8F%8B/id1454088662"
  171. );
  172. $(".download").on("click", function() {
  173. _czc.push(["_trackEvent", "iOS", "下载链接"]);
  174. });
  175. } else {
  176. $(".download")[0].setAttribute("href", BaseDownloadAndroid);
  177. $(".download").on("click", function() {
  178. _czc.push(["_trackEvent", "Android", "下载链接"]);
  179. if (navigator.userAgent.indexOf("MicroMessenger") > -1) {
  180. $(".wx-down").show();
  181. // 遮罩层禁止页面滚动
  182. document.addEventListener("touchmove", function(event) {
  183. event.preventDefault();
  184. });
  185. return false;
  186. }
  187. });
  188. }
  189. }
  190. });
  191. </script>
  192. <!-- cnzz 统计 -->
  193. <!-- <div style="display: none;">
  194. <script
  195. type="text/javascript"
  196. src="https://s23.cnzz.com/z_stat.php?id=1276881507&web_id=1276881507"
  197. ></script>
  198. </div> -->
  199. </body>
  200. </html>