actFissionShare.html 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420
  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>活动已下架,敬请期待</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 : 'admin',
  217. topic: null,
  218. defaultImg: 'this.src="' + "../static/offImg/tou.png" + '"',
  219. marqueeList: [],
  220. code: '',
  221. },
  222. created() {
  223. // window.location.href = 'investigate.html'
  224. },
  225. mounted() {
  226. this.getActDetail();
  227. this.getMarquee(); //跑马灯
  228. },
  229. methods: {
  230. //查看活动是否下架
  231. getActDetail() { //获取活动状态
  232. getActDetail().then(res => {
  233. this.$toast.clear();
  234. if (res.status === 0) {
  235. if (res.data.actStatus == 1) {
  236. this.isshow = true;
  237. this.getStrategy();
  238. } else {
  239. this.isshow = false;
  240. }
  241. } else {
  242. this.$toast(res.msg);
  243. }
  244. })
  245. },
  246. getCheck() {
  247. getEvantCheck(this.id).then(res => {
  248. console.log(res)
  249. })
  250. },
  251. createCopy() {
  252. // this.$toast.loading({
  253. // duration: 0,
  254. // message: '加载中...',
  255. // forbidClick: true,
  256. // loadingType: 'spinner',
  257. // });
  258. systemBuriedPoint({
  259. pointName: 'dt_裂变_h5_复制激活码'
  260. }).then(res => {
  261. })
  262. var clipboard = new ClipboardJS('.copybtn')
  263. getActivationCode(this.username).then(res => {
  264. this.$toast.clear();
  265. if (res.status === 0) {
  266. //此处为点击的dom的类名
  267. this.code = res.data[0].code;
  268. console.log(this.code);
  269. try {
  270. const input = document.createElement('textarea')
  271. input.value = this.code;
  272. document.body.appendChild(input)
  273. input.select() // 选择对象
  274. document.execCommand('Copy') // 执行浏览器复制命令
  275. input.style.display = 'none'
  276. input.remove()
  277. this.$dialog.alert({
  278. message: '复制成功'
  279. });
  280. setTimeout(() => {
  281. this.$dialog.close();
  282. this.download();
  283. }, 2000)
  284. } catch (err) {
  285. this.$dialog.alert({
  286. message: '失败'
  287. });
  288. setTimeout(() => {
  289. this.$dialog.close();
  290. }, 2000)
  291. }
  292. } else {
  293. this.$dialog.alert({
  294. message: res.msg
  295. });
  296. setTimeout(() => {
  297. this.$dialog.close();
  298. }, 2000)
  299. }
  300. })
  301. },
  302. download() {
  303. var u = navigator.userAgent,
  304. app = navigator.appVersion;
  305. var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; //g
  306. var isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
  307. if (isAndroid) {
  308. window.location.href =
  309. 'http://www.androidscloud.com//suanchou';
  310. } else if (isIOS) {
  311. window.location.href = 'https://www.pgyer.com/gemini6';
  312. }
  313. },
  314. standarImg(id) {
  315. return `${fileCenterApi}/file-center/fileOperate/getImage?id=${id}`;
  316. },
  317. getMarquee() {
  318. getMarquee().then(res => {
  319. if (res.status === 0) {
  320. this.marqueeList = res.data;
  321. } else {
  322. this.$toast(res.msg);
  323. }
  324. })
  325. },
  326. getStrategy() {
  327. this.$toast.loading({
  328. duration: 0,
  329. message: '加载中...',
  330. forbidClick: true,
  331. loadingType: 'spinner',
  332. });
  333. getStrategy().then(res => {
  334. this.$toast.clear();
  335. if (res.status == 0) {
  336. if (res.data) {
  337. this.isshow = true;
  338. this.topic = res.data.content;
  339. console.log(this.topic)
  340. } else {
  341. this.isshow = false;
  342. }
  343. }
  344. console.log(res)
  345. })
  346. },
  347. onCopy() {
  348. console.log(2323);
  349. this.$toast('复制成功');
  350. },
  351. onError() {
  352. this.$toast('复制失败');
  353. },
  354. }
  355. })
  356. </script>
  357. </body>
  358. </html>