actFissionShare.html 15 KB

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