actFissionShare.html 18 KB

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