actFissionShare.html 13 KB

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