actFissionShare.html 15 KB

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