actFissionShare.html 13 KB

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