actFissionShare.html 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849
  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. .mask {
  227. width: 7.5rem;
  228. height: 100vh;
  229. position: absolute;
  230. top: 0;
  231. left: 0;
  232. background: rgba(0, 0, 0, 0.24);
  233. display: none;
  234. }
  235. .dialog {
  236. width: 6.22rem;
  237. height: 8.56rem;
  238. background: #FFFFFF;
  239. border-radius: 0.2rem;
  240. position: absolute;
  241. left: 0.72rem;
  242. padding: 0 0.4rem;
  243. top: -6.96rem;
  244. /* overflow: hidden; */
  245. }
  246. .imgs-block{
  247. width: 100%;
  248. display: flex;
  249. justify-content: center;
  250. align-items: center;
  251. position: relative;
  252. margin-top: 0.5rem;
  253. }
  254. .copy-tip{
  255. display: flex;
  256. justify-content: center;
  257. font-size: 0.28rem;
  258. margin-top: 0.32rem;
  259. color: #333333;
  260. }
  261. .my{
  262. color: #000000;
  263. font-weight: 600;
  264. }
  265. .point1{
  266. font-size: 0.26rem;
  267. margin-top: 0.16rem;
  268. color: #666666;
  269. }
  270. .point-img{
  271. width: 5.42rem;
  272. height: 1.7rem;
  273. margin: auto;
  274. margin-top: 0.2rem;
  275. }
  276. .point2{
  277. margin-top: 0.32rem;
  278. }
  279. .imgs{
  280. width: 0.38rem;
  281. height: 0.38rem;
  282. }
  283. .imgs-text{
  284. font-size: 0.36rem;
  285. color: #3B7FFF;
  286. }
  287. .get-success-block{
  288. display: flex;
  289. justify-content: center;
  290. margin-top: 0.3rem;
  291. }
  292. .get-success{
  293. width: 4.6rem;
  294. height: 0.9rem;
  295. line-height: 0.9rem;
  296. text-align: center;
  297. color: #FFFFFF;
  298. font-size: 0.25rem;
  299. background: linear-gradient(180deg, #6DB6FF 0%, #3B7FFF 100%);
  300. border-radius: 0.2rem;
  301. }
  302. .close{
  303. width: 0.48rem;
  304. height: 0.48rem;
  305. position: absolute;
  306. bottom: -0.8rem;
  307. left: 50%;
  308. margin-left: -0.24rem;
  309. z-index: 999;
  310. }
  311. #toast-container>.toast-error {
  312. background-image: none!important;
  313. }
  314. .toast-error {
  315. background-color: rgba(0, 0, 0, 0.7);
  316. }
  317. .toast-message {
  318. font-size: 0.24rem;
  319. padding: 0 0.1rem;
  320. line-height: 0.9rem;
  321. text-align: center;
  322. font-weight: 400;
  323. color: #FFFFFF;
  324. }
  325. #toast-container>div {
  326. width: 4rem;
  327. height: 0.9rem;
  328. opacity: 1;
  329. padding: 0 !important;
  330. border-radius: 0.2rem;
  331. box-shadow: none;
  332. }
  333. .toast-center-center {
  334. position: fixed;
  335. top: 50%;
  336. left: 50%;
  337. z-index: 99;
  338. margin-top: -0.45rem;
  339. transform: translate(-50%,-50%);
  340. }
  341. .mask{
  342. position: fixed;
  343. width: 100vw;
  344. }
  345. @media (max-width: 480px) and (min-width: 241px) {
  346. #toast-container>div {
  347. min-width: 80px !important;
  348. width: auto;
  349. }
  350. }
  351. </style>
  352. </head>
  353. <body>
  354. <div id="mpanel2"></div>
  355. <div id="form-btn"></div>
  356. <div id="app" v-cloak class="container ">
  357. <div v-if='isshow&&topic!=null' style="margin: 0 auto;">
  358. <div class="footer">
  359. <div class="download-btn">
  360. <div class="left-nav">
  361. <p>激活码:</p>
  362. <p>AS4*********SD3</p>
  363. </div>
  364. <!-- @click='createCopy()' -->
  365. <div class="button-download " @click='copyHandle()'>点击复制并下载</div>
  366. </div>
  367. </div>
  368. <div class="top-banner">
  369. <van-notice-bar :scrollable="false">
  370. <van-swipe vertical class="notice-swipe" :autoplay="2000" :show-indicators="false">
  371. <van-swipe-item v-for="(item,index) in marqueeList">
  372. <img :src="standarImg(item.headImgUrl)" :onerror="defaultImg" alt="">
  373. <div class="hide">双子星邀请你免费领取云手机</div>
  374. <p>{{item.surfaceName}}</p>
  375. <p>已获得星曜云手机套餐</p>
  376. </van-swipe-item>
  377. </van-swipe>
  378. </van-notice-bar>
  379. </div>
  380. <div class="top-content">
  381. <div v-html="topic" class="topic-info"></div>
  382. </div>
  383. </div>
  384. <div v-if='!isshow' class="hideContainer">
  385. <div>
  386. <img src="../static/offImg/no-data.png" alt="" />
  387. <p>{{msg}},敬请期待</p>
  388. </div>
  389. </div>
  390. </div>
  391. <div class="mask">
  392. <div class="dialog">
  393. <div class="imgs-block">
  394. <img class="imgs" src="../static/img/icon-copy.png" />
  395. <div class="imgs-text">复制成功</div>
  396. <img class="imgs" src="../static/img/icon-copy.png" />
  397. </div>
  398. <div class="copy-tip">温馨提示:激活码使用教程</div>
  399. <div class="point1">1、在双子星APP的工具栏,点击 <span class="my">[我的]</span></div>
  400. <img class="point-img" src="../static/img/point1.png" />
  401. <div class="point1 point2">2、找到 我的工具 - <span class="my">[激活码] </span>,点击激活码
  402. 即可兑换使用激活码啦。</div>
  403. <img class="point-img" src="../static/img/point2.png" />
  404. <div class="get-success-block">
  405. <div class="get-success">下载APP</div>
  406. </div>
  407. <img class="close" src="img/close.png" />
  408. </div>
  409. </div>
  410. <script src="../static/js/vender/verify.js"></script>
  411. <script src="../static/js/vender/vue/vue.min.js"></script>
  412. <script src="../static/js/vender/vue/vue-clipboard.min.js"></script>
  413. <script src="../static/js/vender/vue/vant.min.js"></script>
  414. <script src="../static/js/vender/config.js"></script>
  415. <script src="../static/js/vender/uuid.js"></script>
  416. <script src="../static/js/vender/vue/axios.min.js"></script>
  417. <script src="../static/js/vender/vue/config.js"></script>
  418. <script src="../static/js/vender/vue/api.js"></script>
  419. <script>
  420. toastr.options.positionClass = 'toast-center-center';
  421. toastr.options.timeOut = '1500';
  422. </script>
  423. <script type="text/javascript">
  424. // var meta_description = document.getElementsByTagName('meta')['description']
  425. // document.title = '更新标题'
  426. // meta_description.content = '更新描述'; // Android iOS
  427. // var oInput = document.createElement('input'); //创建一个input
  428. // oInput.setAttribute("readonly", "readonly"); //设置只读,否则移动端使用复制功能时可能会造成软件盘弹出
  429. var u = navigator.userAgent,
  430. app = navigator.appVersion;
  431. var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; //g
  432. var isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
  433. var clipboard = new ClipboardJS('.copybtn') //此处为点击的dom的类名
  434. var html = document.documentElement;
  435. var imgWidth = html.getBoundingClientRect().width / 750 * 400 + 'px';
  436. var imgHeight = html.getBoundingClientRect().width / 750 * 200 + 'px';
  437. var barHeight = html.getBoundingClientRect().width / 750 * 70 + 'px';
  438. var code = '';
  439. $('.close')[0].addEventListener('click', (e) => {
  440. $('.dialog').animate({top: '-6.96rem'},"fast");
  441. $('.mask').hide();
  442. document.documentElement.style.overflow='auto';
  443. });
  444. $('.get-success-block')[0].addEventListener('click', (e) => {
  445. if(isIOS){
  446. copyUrl();
  447. }else{
  448. download();
  449. }
  450. });
  451. function download() {
  452. if (isAndroid) {
  453. if (baseUrl == 'https://per.cs.se.androidscloud.com') {
  454. window.location.href = 'http://per.cs.se.androidscloud.com:8888/suanchou'
  455. } else {
  456. window.location.href = 'http://www.androidscloud.com/suanchou?timestamp=' + Math.random();
  457. }
  458. } else if (isIOS) {
  459. document.location.href = 'https://www.pgyer.com/gemini6?timestamp=' + Math.random();
  460. } else {
  461. document.location.href = 'https://www.androidscloud.com?timestamp=' + Math.random();
  462. }
  463. }
  464. function copyUrl() {
  465. var oInput = document.createElement('input'); //创建一个input
  466. oInput.setAttribute("readonly", "readonly"); //设置只读,否则移动端使用复制功能时可能会造成软件盘弹出
  467. setTimeout(() => {
  468. oInput.value = code;
  469. // $('.ipt')[0].appendChild(oInput); //将input插入到body
  470. // oInput.select(); // 选择对象 ios不支持
  471. document.body.appendChild(oInput)
  472. selectText(oInput, 0, oInput.value.length);
  473. document.execCommand("Copy"); // 执行浏览器复制命令
  474. // toastr.error(`复制成功`);
  475. $('.dialog').animate({top: '-6.96rem'},"fast");
  476. $('.mask').hide();
  477. document.documentElement.style.overflow='auto';
  478. oInput.style.display = 'none'; // 将input隐藏
  479. oInput.blur();
  480. oInput.remove(); // 将input销毁
  481. document.location.href = 'https://www.pgyer.com/gemini6?timestamp=' + Math.random();
  482. // setTimeout(() => {
  483. // this.$dialog.close();
  484. // // this.download();
  485. // }, 2000)
  486. }, 400)
  487. };
  488. function 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. new Vue({
  501. el: '#app',
  502. data: {
  503. isshow: true,
  504. id: GetRequest().id ? GetRequest().id : 404,
  505. username: GetRequest().username ? GetRequest().username : '',
  506. topic: null,
  507. defaultImg: 'this.src="' + "../static/offImg/tou.png" + '"',
  508. marqueeList: [],
  509. code: '',
  510. msg: '活动已下架',
  511. strategyId: GetRequest().strategyId ? GetRequest().strategyId : '',
  512. tagId: GetRequest().tagId ? GetRequest().tagId : '',
  513. uuid: '',
  514. flag: true,
  515. timer: null,
  516. },
  517. created() {
  518. // window.location.href = 'investigate.html'
  519. },
  520. mounted() {
  521. // this.$dialog.alert({
  522. // message: '激活码总数已上限,谢谢参与'
  523. // })
  524. // document.querySelector('#app').classList.remove('hide');
  525. // this.validate(); // 生成验证码
  526. this.getActDetail();
  527. this.getMarquee(); //跑马灯
  528. if (localStorage.getItem("uuid")) {
  529. this.uuid = localStorage.getItem("uuid");
  530. } else {
  531. this.uuid = UUID.generate();
  532. localStorage.setItem("uuid", this.uuid);
  533. }
  534. },
  535. methods: {
  536. copyHandle(){
  537. getActivationCode(this.username, this.tagId, this.uuid).then(res => {
  538. this.$toast.clear();
  539. if (res.status === 2 || res.status === 11) {
  540. $('#mpanel2').eq(0).text('');
  541. this.validate(); // 生成验证码
  542. setTimeout(() => {
  543. document.getElementById('form-btn').click();
  544. },500)
  545. } else {
  546. systemBuriedPoint({
  547. pointName: 'dt_裂变_h5_复制激活码'
  548. }).then(res => {})
  549. this.code = res.data;
  550. this.copyUrl();
  551. }
  552. }).catch((error) => {
  553. alert(error)
  554. this.$toast('复制失败');
  555. this.download()
  556. });
  557. },
  558. //查看活动是否下架
  559. getActDetail() { //获取活动状态
  560. getActDetail().then(res => {
  561. this.$toast.clear();
  562. if (res.status === 0) {
  563. if (res.data.actStatus == 1) {
  564. this.isshow = true;
  565. this.getStrategy();
  566. } else {
  567. this.isshow = false;
  568. }
  569. } else {
  570. this.$toast(res.msg);
  571. }
  572. }).catch((error) => {
  573. console.log(error)
  574. this.$toast('网络异常');
  575. });
  576. },
  577. getCheck() {
  578. getEvantCheck(this.id).then(res => {
  579. console.log(res)
  580. })
  581. },
  582. createCopy(captchaVerification) {
  583. // this.$toast.loading({
  584. // duration: 0,
  585. // message: '加载中...',
  586. // forbidClick: true,
  587. // loadingType: 'spinner',
  588. this.stopManyClick(() => {
  589. systemBuriedPoint({
  590. pointName: 'dt_裂变_h5_复制激活码'
  591. }).then(res => {
  592. })
  593. getActivationCode(this.username, this.tagId, this.uuid, captchaVerification).then(res => {
  594. this.$toast.clear();
  595. if (res.status === 0) {
  596. this.code = res.data;
  597. this.copyUrl();
  598. if(isIOS){
  599. code = res.data;
  600. }
  601. // if(isAndroid){
  602. // this.code = res.data;
  603. // this.copyUrl();
  604. // }else if(isIOS){
  605. // $('.dialog').animate({top: '3.36rem'},"fast");
  606. // $('.mask').show();
  607. // document.documentElement.style.overflow='hidden';
  608. // code = res.data;
  609. // } else {
  610. // this.code = res.data;
  611. // this.copyUrl();
  612. // }
  613. } else {
  614. this.$dialog.alert({
  615. message: res.msg
  616. });
  617. setTimeout(() => {
  618. this.$dialog.close();
  619. this.download();
  620. }, 2000)
  621. }
  622. }).catch((error) => {
  623. alert(error)
  624. this.$toast('复制失败');
  625. this.download()
  626. });
  627. })
  628. },
  629. download() {
  630. if (isAndroid) {
  631. if (baseUrl == 'https://per.cs.se.androidscloud.com') {
  632. window.location.href = 'http://per.cs.se.androidscloud.com:8888/suanchou'
  633. } else {
  634. window.location.href = 'http://www.androidscloud.com/suanchou?timestamp=' + Math.random();
  635. }
  636. } else if (isIOS) {
  637. document.location.href = 'https://www.pgyer.com/gemini6?timestamp=' + Math.random();
  638. } else {
  639. document.location.href = 'https://www.androidscloud.com?timestamp=' + Math.random();
  640. }
  641. },
  642. standarImg(id) {
  643. return `${fileCenterApi}/file-center/fileOperate/getImage?id=${id}`;
  644. },
  645. getMarquee() {
  646. getMarquee().then(res => {
  647. if (res.status === 0) {
  648. this.marqueeList = res.data;
  649. } else {
  650. this.$toast(res.msg);
  651. }
  652. })
  653. },
  654. getStrategy() {
  655. this.$toast.loading({
  656. duration: 0,
  657. message: '加载中...',
  658. forbidClick: true,
  659. loadingType: 'spinner',
  660. });
  661. getStrategy(this.strategyId).then(res => {
  662. this.$toast.clear();
  663. if (res.status === 0) {
  664. if (res.data) {
  665. this.isshow = true;
  666. this.topic = res.data.content;
  667. // this.tagId = res.data.tagId;
  668. console.log(this.topic)
  669. } else {
  670. this.msg = res.msg;
  671. this.isshow = false;
  672. }
  673. }else {
  674. this.$toast(res.msg);
  675. }
  676. console.log(res)
  677. }).catch((error) => {
  678. console.log(error)
  679. this.$toast('网络异常');
  680. });
  681. },
  682. validate() {
  683. $('#mpanel2').slideVerify({
  684. baseUrl: baseUrl + '/api/user', //服务器请求地址, 默认地址为安吉服务器;
  685. mode: 'pop', //展示模式
  686. containerId: 'form-btn', //pop模式 必填 被点击之后出现行为验证码的元素id
  687. imgSize: { //图片的大小对象,有默认值{ width: '310px',height: '155px'},可省略
  688. width: imgWidth,
  689. height: imgHeight
  690. },
  691. barSize: {//下方滑块的大小对象,有默认值{ width: '310px',height: '50px'},可省略
  692. width: imgWidth,
  693. height: barHeight
  694. },
  695. beforeCheck: () => {
  696. return true
  697. },
  698. ready: () => {
  699. }, //加载完毕的回调
  700. success: (params) => { //成功的回调
  701. this.createCopy(params.captchaVerification);
  702. },
  703. error: function () {}
  704. });
  705. },
  706. handTouch(e){
  707. e.preventDefault();
  708. },
  709. //下载指引弹窗
  710. downloadTip(){
  711. $('.dialog').animate({top: '3.36rem'},"fast");
  712. $('.mask').show();
  713. document.documentElement.style.overflow='hidden';
  714. },
  715. copyUrl() {
  716. var oInput = document.createElement('input'); //创建一个input
  717. oInput.setAttribute("readonly", "readonly"); //设置只读,否则移动端使用复制功能时可能会造成软件盘弹出
  718. setTimeout(() => {
  719. oInput.value = this.code;
  720. // $('.ipt')[0].appendChild(oInput); //将input插入到body
  721. // oInput.select(); // 选择对象 ios不支持
  722. document.body.appendChild(oInput)
  723. this.selectText(oInput, 0, oInput.value.length);
  724. document.execCommand("Copy"); // 执行浏览器复制命令
  725. // this.$dialog.alert({
  726. // message: `复制成功`
  727. // })
  728. oInput.style.display = 'none'; // 将input隐藏
  729. oInput.blur();
  730. oInput.remove(); // 将input销毁
  731. setTimeout(() => {
  732. this.$dialog.close();
  733. this.downloadTip();
  734. // this.download();
  735. }, 2000)
  736. }, 400)
  737. },
  738. selectText(textbox, startIndex, stopIndex) {
  739. if (textbox.createTextRange) { //ie
  740. const range = textbox.createTextRange();
  741. range.collapse(true);
  742. range.moveStart('character', startIndex); //起始光标
  743. range.moveEnd('character', stopIndex - startIndex); //结束光标
  744. range.select(); //不兼容苹果
  745. } else { //firefox/chrome
  746. textbox.setSelectionRange(startIndex, stopIndex);
  747. textbox.focus();
  748. }
  749. },
  750. stopManyClick(fn) { //防抖
  751. if (this.flag) {
  752. fn();
  753. }
  754. this.flag = false;
  755. if (this.timer) {
  756. clearTimeout(this.timer);
  757. }
  758. this.timer = setTimeout(() => {
  759. this.flag = true
  760. }, 1500);
  761. },
  762. onCopy() {
  763. console.log(2323);
  764. this.$toast('复制成功');
  765. },
  766. onError() {
  767. this.$toast('复制失败');
  768. },
  769. }
  770. })
  771. </script>
  772. </body>
  773. </html>