actFissionShare.html 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580
  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
  6. <meta name="description" content="双子星邀请你免费领取云手机">
  7. <link rel="icon" href="../static/img/favicon2.ico" type="img/x-ico">
  8. <link rel="stylesheet" href="../static/css/index.css">
  9. <link rel="stylesheet" href="../static/css/vant.css" />
  10. <script src="../static/js/vender/jquery-3.4.1.min.js"></script>
  11. <link rel="stylesheet" href="../static/css/verify.css">
  12. <link rel="stylesheet" href="../static/js/vender/toastr/toastr.min.css">
  13. <script>
  14. (function () {
  15. if (!window.Promise) {
  16. document.writeln('<script src="https://cdnjs.cloudflare.com/ajax/libs/es6-promise/4.1.1/es6-promise.min.js"><' + '/' + 'script>');
  17. }
  18. })();
  19. </script>
  20. <script src="../static/js/vender/toastr/toastr.min.js"></script>
  21. <script src="../static/js/vender/config.js"></script>
  22. <script src="../static/js/vender/crypto-js.js"></script>
  23. <script src="../static/js/vender/ase.js"></script>
  24. <!-- <script src="../static/js/vender/vue/vue.min.js"></script>
  25. <script src="../static/js/vender/vue/vant.min.js"></script>
  26. <script src="../static/js/vender/config.js"></script>
  27. <script src="../static/js/vender/uuid.js"></script>
  28. <script src="../static/js/vender/vue/axios.min.js"></script>
  29. <script src="../static/js/vender/vue/config.js"></script>
  30. <script src="../static/js/vender/vue/api.js"></script> -->
  31. <title>分享攻略</title>
  32. <style>
  33. [v-cloak] {
  34. display: none !important;
  35. }
  36. .container {
  37. display: flex;
  38. height: 100vh;
  39. padding-top: 0.2rem;
  40. /* align-items: center;
  41. justify-content: center; */
  42. }
  43. .top-banner {
  44. width: 6.9rem;
  45. height: 0.82rem;
  46. background: url("../static/offImg/share-top.png") no-repeat;
  47. background-size: 100% 100%;
  48. }
  49. .footer {
  50. position: fixed;
  51. bottom: 0.5rem;
  52. padding: 0 0.3rem;
  53. width: 100%;
  54. left: 0;
  55. display: flex;
  56. justify-content: center;
  57. }
  58. .download-btn {
  59. width: 7.2rem;
  60. height: 1.3rem;
  61. background: url('../static/offImg/btn-down.png') no-repeat scroll top center #3B7FFF;
  62. background-size: 100% 100%;
  63. box-shadow: 0rem 0.06rem 0.4rem 0rem rgba(59, 127, 255, 0.6);
  64. border-radius: 0.2rem;
  65. display: flex;
  66. justify-content: space-between;
  67. align-items: center;
  68. padding: 0 0.4rem;
  69. }
  70. .button-download {
  71. width: 2.5rem;
  72. height: 0.8rem;
  73. line-height: 0.8rem;
  74. background: linear-gradient(360deg, #FF8300 0%, #FEC000 100%);
  75. border-radius: 0.2rem;
  76. text-align: center;
  77. font-size: 0.3rem;
  78. font-family: PingFangSC-Medium, PingFang SC;
  79. color: #FFFFFF;
  80. }
  81. .download-btn .left-nav p:first-of-type {
  82. font-size: 0.24rem;
  83. font-family: PingFangSC-Regular, PingFang SC;
  84. font-weight: 400;
  85. color: rgba(255, 255, 255, 0.7);
  86. margin-bottom: 0.02rem;
  87. }
  88. .download-btn .left-nav p+p {
  89. font-size: 0.28rem;
  90. font-family: PingFangSC-Regular, PingFang SC;
  91. font-weight: 400;
  92. color: rgba(255, 255, 255, 0.9);
  93. }
  94. .hideContainer {
  95. width: 100%;
  96. display: flex;
  97. justify-content: center;
  98. align-items: center;
  99. height: calc(100vh - 1.36rem);
  100. text-align: center;
  101. }
  102. .hideContainer img {
  103. width: 2.8rem;
  104. height: 2.8rem;
  105. }
  106. .hideContainer p {
  107. margin-top: 0.3rem;
  108. font-family: PingFangSC-Regular, PingFang SC;
  109. color: #999999;
  110. font-size: 0.28rem;
  111. }
  112. .top-content {
  113. width: 6.9rem;
  114. padding-bottom: 0.3rem;
  115. }
  116. .top-content .title {
  117. font-size: 0.44rem;
  118. font-family: PingFangSC-Medium, PingFang SC;
  119. color: #000000;
  120. letter-spacing: 0.01rem;
  121. margin-bottom: 0.2rem;
  122. }
  123. .topic-info {
  124. padding-bottom: 1.6rem;
  125. }
  126. .topic-info img {
  127. max-width: 100%;
  128. width: auto;
  129. height: auto;
  130. border-radius: 0.2rem;
  131. margin-bottom: 0.2rem;
  132. margin-top: 0.2rem;
  133. }
  134. .topic-info {
  135. font-size: 0.3rem;
  136. font-family: PingFangSC-Regular, PingFang SC;
  137. font-weight: 400;
  138. color: #333333;
  139. letter-spacing: 0.02rem;
  140. }
  141. .topic-info p {
  142. font-size: 0.36rem;
  143. font-family: PingFangSC-Regular, PingFang SC;
  144. font-weight: 400;
  145. color: #333333;
  146. letter-spacing: 0.02rem;
  147. }
  148. .van-notice-bar {
  149. height: 100%;
  150. background: none;
  151. width: 100%;
  152. }
  153. .notice-swipe {
  154. height: 0.8rem;
  155. line-height: 0.8rem;
  156. }
  157. .van-swipe-item {
  158. display: flex;
  159. align-items: center;
  160. }
  161. .van-swipe-item img {
  162. width: 0.6rem;
  163. margin-left: 0.3rem;
  164. border-radius: 50%;
  165. margin-right: 0.1rem;
  166. height: 0.6rem;
  167. }
  168. .van-swipe-item p {
  169. font-size: 0.28rem;
  170. font-family: PingFangSC-Regular, PingFang SC;
  171. color: #FFFFFF;
  172. }
  173. .van-swipe-item p:first-of-type {
  174. max-width: 2.4rem;
  175. display: block;
  176. overflow: hidden;
  177. word-break: keep-all;
  178. white-space: nowrap;
  179. text-overflow: ellipsis;
  180. }
  181. .topic-info img {
  182. max-width: 100%;
  183. width: auto;
  184. height: auto;
  185. border-radius: 0.2rem;
  186. margin-bottom: 0.2rem;
  187. margin-top: 0.2rem;
  188. }
  189. .topic-info p {
  190. font-size: 0.3rem;
  191. font-family: PingFangSC-Regular, PingFang SC;
  192. font-weight: 400;
  193. color: #333333;
  194. letter-spacing: 0.02rem;
  195. }
  196. .van-dialog__footer {
  197. display: none;
  198. }
  199. .top-banner {
  200. margin: 0 auto;
  201. margin-bottom: 0.1rem;
  202. }
  203. .hide {
  204. display: none !important;
  205. }
  206. .van-overlay {
  207. background-color: rgba(0, 0, 0, 0.5);
  208. }
  209. .van-dialog__content {
  210. /* padding: 0.3rem 0.6rem; */
  211. min-height: unset !important;
  212. }
  213. .van-dialog {
  214. border-radius: 0.2rem;
  215. width: unset !important;
  216. }
  217. .van-dialog__message {
  218. padding: 0.3rem 0.6rem;
  219. font-size: 0.3rem;
  220. white-space: nowrap;
  221. font-family: PingFangSC-Regular, PingFang SC;
  222. }
  223. .van-dialog__content {
  224. border-radius: 0.2rem;
  225. }
  226. </style>
  227. </head>
  228. <body>
  229. <div id="mpanel2"></div>
  230. <!-- <input id="foo" value="hello,clipboard."> -->
  231. <button id="wewewe" style="display: none">复制到剪贴板</button>
  232. <!-- <div class="ipt"></div> -->
  233. <div id="app" v-cloak class="container ">
  234. <div v-if='isshow&&topic!=null' style="margin: 0 auto;">
  235. <div class="footer">
  236. <div class="download-btn">
  237. <div class="left-nav">
  238. <p>激活码:</p>
  239. <p>AS4*********SD3</p>
  240. </div>
  241. <!-- @click='createCopy()' -->
  242. <div class="button-download " id="form-btn">点击复制并下载</div>
  243. </div>
  244. </div>
  245. <div class="top-banner">
  246. <van-notice-bar :scrollable="false">
  247. <van-swipe vertical class="notice-swipe" :autoplay="2000" :show-indicators="false">
  248. <van-swipe-item v-for="(item,index) in marqueeList">
  249. <img :src="standarImg(item.headImgUrl)" :onerror="defaultImg" alt="">
  250. <div class="hide">双子星邀请你免费领取云手机</div>
  251. <p>{{item.surfaceName}}</p>
  252. <p>已获得星曜云手机套餐</p>
  253. </van-swipe-item>
  254. </van-swipe>
  255. </van-notice-bar>
  256. </div>
  257. <div class="top-content">
  258. <div v-html="topic" class="topic-info"></div>
  259. </div>
  260. </div>
  261. <div v-if='!isshow' class="hideContainer">
  262. <div>
  263. <img src="../static/offImg/no-data.png" alt="" />
  264. <p>{{msg}},敬请期待</p>
  265. </div>
  266. </div>
  267. </div>
  268. <script src="../static/js/vender/verify.js"></script>
  269. <script src="../static/js/vender/clipboard.min.js"></script>
  270. <script src="../static/js/vender/vue/vue.min.js"></script>
  271. <script src="../static/js/vender/vue/vue-clipboard.min.js"></script>
  272. <script src="../static/js/vender/vue/vant.min.js"></script>
  273. <script src="../static/js/vender/config.js"></script>
  274. <script src="../static/js/vender/uuid.js"></script>
  275. <script src="../static/js/vender/vue/axios.min.js"></script>
  276. <script src="../static/js/vender/vue/config.js"></script>
  277. <script src="../static/js/vender/vue/api.js"></script>
  278. <script type="text/javascript">
  279. // var meta_description = document.getElementsByTagName('meta')['description']
  280. // document.title = '更新标题'
  281. // meta_description.content = '更新描述'; // Android iOS
  282. // var oInput = document.createElement('input'); //创建一个input
  283. // oInput.setAttribute("readonly", "readonly"); //设置只读,否则移动端使用复制功能时可能会造成软件盘弹出
  284. var u = navigator.userAgent,
  285. app = navigator.appVersion;
  286. var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; //g
  287. var isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
  288. var clipboard = new ClipboardJS('.copybtn') //此处为点击的dom的类名
  289. var html = document.documentElement;
  290. var imgWidth = html.getBoundingClientRect().width / 750 * 400 + 'px';
  291. var imgHeight = html.getBoundingClientRect().width / 750 * 200 + 'px';
  292. var barHeight = html.getBoundingClientRect().width / 750 * 70 + 'px';
  293. new Vue({
  294. el: '#app',
  295. data: {
  296. isshow: true,
  297. id: GetRequest().id ? GetRequest().id : 404,
  298. username: GetRequest().username ? GetRequest().username : '',
  299. topic: null,
  300. defaultImg: 'this.src="' + "../static/offImg/tou.png" + '"',
  301. marqueeList: [],
  302. code: '',
  303. msg: '活动已下架',
  304. strategyId: GetRequest().strategyId ? GetRequest().strategyId : '',
  305. tagId: GetRequest().tagId ? GetRequest().tagId : '',
  306. uuid: '',
  307. flag: true,
  308. timer: null,
  309. },
  310. created() {
  311. // window.location.href = 'investigate.html'
  312. setTimeout(() => {
  313. this.validate(); // 生成验证码
  314. },500)
  315. },
  316. mounted() {
  317. // this.$dialog.alert({
  318. // message: '激活码总数已上限,谢谢参与'
  319. // })
  320. // document.querySelector('#app').classList.remove('hide');
  321. this.getActDetail();
  322. this.getMarquee(); //跑马灯
  323. if (localStorage.getItem("uuid")) {
  324. this.uuid = localStorage.getItem("uuid");
  325. } else {
  326. this.uuid = UUID.generate();
  327. localStorage.setItem("uuid", this.uuid);
  328. }
  329. console.log(this.uuid);
  330. },
  331. methods: {
  332. //查看活动是否下架
  333. getActDetail() { //获取活动状态
  334. getActDetail().then(res => {
  335. this.$toast.clear();
  336. if (res.status === 0) {
  337. if (res.data.actStatus == 1) {
  338. this.isshow = true;
  339. this.getStrategy();
  340. } else {
  341. this.isshow = false;
  342. }
  343. } else {
  344. this.$toast(res.msg);
  345. }
  346. }).catch((error) => {
  347. console.log(error)
  348. this.$toast('网络异常');
  349. });
  350. },
  351. getCheck() {
  352. getEvantCheck(this.id).then(res => {
  353. console.log(res)
  354. })
  355. },
  356. createCopy(captchaVerification) {
  357. // this.$toast.loading({
  358. // duration: 0,
  359. // message: '加载中...',
  360. // forbidClick: true,
  361. // loadingType: 'spinner',
  362. this.stopManyClick(() => {
  363. systemBuriedPoint({
  364. pointName: 'dt_裂变_h5_复制激活码'
  365. }).then(res => {
  366. })
  367. getActivationCode(this.username, this.tagId, this.uuid, captchaVerification).then(res => {
  368. this.$toast.clear();
  369. if (res.status === 0) {
  370. //此处为点击的dom的类名
  371. this.code = res.data;
  372. this.copyUrl();
  373. } else {
  374. this.$dialog.alert({
  375. message: res.msg
  376. });
  377. setTimeout(() => {
  378. this.$dialog.close();
  379. this.download();
  380. }, 2000)
  381. }
  382. }).catch((error) => {
  383. console.log(error)
  384. this.$toast('复制失败');
  385. //this.download()
  386. });
  387. })
  388. },
  389. download() {
  390. if (isAndroid) {
  391. if (baseUrl == 'https://per.cs.se.androidscloud.com') {
  392. window.location.href = 'http://per.cs.se.androidscloud.com:8888/suanchou'
  393. } else {
  394. window.location.href = 'http://www.androidscloud.com/suanchou?timestamp=' + Math.random();
  395. }
  396. } else if (isIOS) {
  397. document.location.href = 'https://www.pgyer.com/gemini6?timestamp=' + Math.random();
  398. } else {
  399. document.location.href = 'https://www.androidscloud.com?timestamp=' + Math.random();
  400. }
  401. },
  402. standarImg(id) {
  403. return `${fileCenterApi}/file-center/fileOperate/getImage?id=${id}`;
  404. },
  405. getMarquee() {
  406. getMarquee().then(res => {
  407. if (res.status === 0) {
  408. this.marqueeList = res.data;
  409. } else {
  410. this.$toast(res.msg);
  411. }
  412. })
  413. },
  414. getStrategy() {
  415. this.$toast.loading({
  416. duration: 0,
  417. message: '加载中...',
  418. forbidClick: true,
  419. loadingType: 'spinner',
  420. });
  421. getStrategy(this.strategyId).then(res => {
  422. this.$toast.clear();
  423. if (res.status === 0) {
  424. if (res.data) {
  425. this.isshow = true;
  426. this.topic = res.data.content;
  427. // this.tagId = res.data.tagId;
  428. console.log(this.topic)
  429. } else {
  430. this.msg = res.msg;
  431. this.isshow = false;
  432. }
  433. }else {
  434. this.$toast(res.msg);
  435. }
  436. console.log(res)
  437. }).catch((error) => {
  438. console.log(error)
  439. this.$toast('网络异常');
  440. });
  441. },
  442. validate() {
  443. $('#mpanel2').slideVerify({
  444. baseUrl: baseUrl + '/api/user', //服务器请求地址, 默认地址为安吉服务器;
  445. mode: 'pop', //展示模式
  446. containerId: 'form-btn', //pop模式 必填 被点击之后出现行为验证码的元素id
  447. imgSize: { //图片的大小对象,有默认值{ width: '310px',height: '155px'},可省略
  448. width: imgWidth,
  449. height: imgHeight
  450. },
  451. vm: this,
  452. barSize: {//下方滑块的大小对象,有默认值{ width: '310px',height: '50px'},可省略
  453. width: imgWidth,
  454. height: barHeight
  455. },
  456. beforeCheck: function () {
  457. return true
  458. },
  459. ready: function () { }, //加载完毕的回调
  460. success: (params) => { //成功的回调
  461. this.createCopy(params.captchaVerification);
  462. },
  463. error: function () {}
  464. });
  465. },
  466. copyUrl() {
  467. var oInput = document.createElement('input'); //创建一个input
  468. oInput.setAttribute("readonly", "readonly"); //设置只读,否则移动端使用复制功能时可能会造成软件盘弹出
  469. setTimeout(() => {
  470. oInput.value = this.code;
  471. // $('.ipt')[0].appendChild(oInput); //将input插入到body
  472. // oInput.select(); // 选择对象 ios不支持
  473. document.body.appendChild(oInput)
  474. this.selectText(oInput, 0, oInput.value.length);
  475. document.execCommand("Copy"); // 执行浏览器复制命令
  476. this.$dialog.alert({
  477. message: `复制成功`
  478. })
  479. oInput.style.display = 'none'; // 将input隐藏
  480. oInput.blur();
  481. oInput.remove(); // 将input销毁
  482. setTimeout(() => {
  483. this.$dialog.close();
  484. // this.download();
  485. }, 2000)
  486. }, 400)
  487. },
  488. selectText(textbox, startIndex, stopIndex) {
  489. if (textbox.createTextRange) { //ie
  490. const range = textbox.createTextRange();
  491. range.collapse(true);
  492. range.moveStart('character', startIndex); //起始光标
  493. range.moveEnd('character', stopIndex - startIndex); //结束光标
  494. range.select(); //不兼容苹果
  495. } else { //firefox/chrome
  496. textbox.setSelectionRange(startIndex, stopIndex);
  497. textbox.focus();
  498. }
  499. },
  500. stopManyClick(fn) { //防抖
  501. if (this.flag) {
  502. fn();
  503. }
  504. this.flag = false;
  505. if (this.timer) {
  506. clearTimeout(this.timer);
  507. }
  508. this.timer = setTimeout(() => {
  509. this.flag = true
  510. }, 1500);
  511. },
  512. onCopy() {
  513. console.log(2323);
  514. this.$toast('复制成功');
  515. },
  516. onError() {
  517. this.$toast('复制失败');
  518. },
  519. }
  520. })
  521. </script>
  522. </body>
  523. </html>