actFission.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462
  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">
  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. background: #0671F1;
  17. }
  18. .top-banner {
  19. background: url("../static/offImg/bg.png") no-repeat;
  20. width: 100%;
  21. height: 11.6rem;
  22. background-size: 100% 100%;
  23. position: relative;
  24. }
  25. .top-banner .hongbao {
  26. width: 1.46rem;
  27. height: 1.42rem;
  28. position: absolute;
  29. bottom: 1.4rem;
  30. left: 0.7rem;
  31. }
  32. .bottom-btn {
  33. position: absolute;
  34. width: 100%;
  35. bottom: -0.12rem;
  36. display: flex;
  37. justify-content: center;
  38. left: 0;
  39. }
  40. .bottom-btn .time-box {
  41. width: 6.26rem;
  42. height: 1.88rem;
  43. background: url("../static/offImg/time.png") no-repeat;
  44. background-size: 100% 100%;
  45. }
  46. .no-start {
  47. width: 6.26rem !important;
  48. height: 1.88rem !important;
  49. background: url("../static/offImg/time-end.png") no-repeat !important;
  50. background-size: 100% 100% !important;
  51. }
  52. .list {
  53. width: 100%;
  54. height: 14.42rem;
  55. background: #0671F1;
  56. padding: 0 0.3rem;
  57. }
  58. .nav-box,
  59. .rule-box {
  60. margin-top: 0.44rem;
  61. width: 100%;
  62. height: 5.7rem;
  63. background: #C3E5FF;
  64. border-radius: 0.2rem;
  65. border: 0.02rem solid #F5FAFF;
  66. position: relative;
  67. }
  68. .rule-box .title-box,
  69. .nav-box .title-box {
  70. width: 100%;
  71. position: absolute;
  72. left: 0;
  73. top: -0.17rem;
  74. display: flex;
  75. justify-content: center;
  76. }
  77. .rule-box .title-box .img-box,
  78. .nav-box .title-box .img-box {
  79. background: url("../static/offImg/title-bg.png") no-repeat;
  80. background-size: 100% 100%;
  81. width: 3.96rem;
  82. height: 0.64rem;
  83. text-align: center;
  84. line-height: 0.64rem;
  85. font-size: 0.32rem;
  86. font-family: PingFangSC-Medium, PingFang SC;
  87. color: #FFFFFF;
  88. }
  89. .outer-box {
  90. margin-top: 0.48rem;
  91. padding: 0.3rem 0.4rem;
  92. overflow-y: scroll;
  93. height: 5.1rem;
  94. }
  95. .list-nav {
  96. display: flex;
  97. margin-bottom: 0.2rem;
  98. justify-content: space-between;
  99. }
  100. .list-nav .user {
  101. display: flex;
  102. }
  103. .list-nav .user .tou {
  104. width: 0.6rem;
  105. height: 0.6rem;
  106. border-radius: 50%;
  107. margin-right: 0.12rem;
  108. }
  109. .list-nav .user .text p:first-of-type {
  110. font-size: 0.24rem;
  111. margin-bottom: 0.08rem;
  112. font-family: PingFangSC-Regular, PingFang SC;
  113. color: #272624;
  114. }
  115. .list-nav .user .text p+p {
  116. font-size: 0.24rem;
  117. font-family: PingFangSC-Regular, PingFang SC;
  118. color: #999999;
  119. }
  120. .right-nav {
  121. display: flex;
  122. align-items: center;
  123. }
  124. .right-nav P:first-of-type {
  125. font-size: 0.24rem;
  126. font-family: PingFangSC-Medium, PingFang SC;
  127. font-weight: 500;
  128. color: #FF8E00;
  129. margin-right: 0.3rem;
  130. }
  131. .right-nav .btn {
  132. width: 1.14rem;
  133. height: 0.52rem;
  134. line-height: 0.52rem;
  135. background: #3B7FFF;
  136. border-radius: 0.08rem;
  137. text-align: center;
  138. font-size: 0.24rem;
  139. font-family: PingFangSC-Regular, PingFang SC;
  140. color: #FFFFFF;
  141. }
  142. .rule-box {
  143. margin-top: 0.62rem;
  144. width: 100%;
  145. height: 6.92rem;
  146. padding: 0.3rem 0.4rem;
  147. }
  148. .rule-box .rule {
  149. margin-top: 0.48rem;
  150. font-size: 0.28rem;
  151. font-family: PingFangSC-Regular, PingFang SC;
  152. color: #333333;
  153. line-height: 0.46rem;
  154. letter-spacing: 0.013rem;
  155. }
  156. .rule-box .rule p {
  157. margin-bottom: 0.12rem;
  158. }
  159. .isdisabled {
  160. background: #E3E7EE !important;
  161. color: #AAADB3 !important;
  162. }
  163. .notice-swipe {
  164. height: 40px;
  165. line-height: 40px;
  166. }
  167. .top-notice {
  168. width: 100%;
  169. padding: 2rem 0.3rem 0 0.3rem;
  170. height: 0.82rem;
  171. }
  172. .van-notice-bar {
  173. width: 100%;
  174. height: 0.82rem;
  175. background: url("../static/offImg/lunbo.png") no-repeat;
  176. background-size: 100% 100%;
  177. }
  178. .van-swipe-item {
  179. display: flex;
  180. align-items: center;
  181. }
  182. .van-swipe-item p:first-of-type {
  183. font-size: 0.28rem;
  184. width: 2.4rem;
  185. color: #00FFFF;
  186. display: block;
  187. overflow: hidden;
  188. word-break: keep-all;
  189. white-space: nowrap;
  190. text-overflow: ellipsis;
  191. }
  192. .van-swipe-item p+p {
  193. font-size: 0.28rem;
  194. color: #FFFFFF;
  195. }
  196. .van-swipe-item img {
  197. width: 0.6rem;
  198. margin-left: 0.4rem;
  199. margin-right: 0.1rem;
  200. border-radius: 50%;
  201. height: 0.6rem;
  202. }
  203. .no-user {
  204. width: 100%;
  205. height: 100%;
  206. display: flex;
  207. justify-content: center;
  208. align-items: center;
  209. font-size: 0.3rem;
  210. font-family: PingFangSC-Regular, PingFang SC;
  211. color: #666666;
  212. }
  213. </style>
  214. </head>
  215. <body>
  216. <div id="app" v-cloak class="app container">
  217. <div class="top-banner">
  218. <img src="../static//offImg/hongbao.png" class="hongbao" alt="">
  219. <div class="top-notice">
  220. <van-notice-bar :scrollable="false">
  221. <van-swipe vertical class="notice-swipe" :autoplay="2000" :show-indicators="false">
  222. <van-swipe-item v-for="(item,index) in marqueeList">
  223. <img :src="standarImg(item.headImgUrl)" :onerror="defaultImg" alt="">
  224. <p>{{item.surfaceName}}</p>
  225. <p>已领取分享奖励</p>
  226. </van-swipe-item>
  227. </van-swipe>
  228. </van-notice-bar>
  229. </div>
  230. <div class="bottom-btn">
  231. <div class="time-box" @click='goReward()' :class="{'no-start':actStatus==0}"></div>
  232. </div>
  233. </div>
  234. <div class="list">
  235. <div class="nav-box">
  236. <!-- <img src="../static/offImg/title-bg.png" alt=""></img> -->
  237. <div class="title-box">
  238. <div class="img-box">活动奖励</div>
  239. </div>
  240. <div class="outer-box" v-if='rewardList&&rewardList.length>0'>
  241. <van-list v-model="loading" :finished-text="finishedText"
  242. :finished="finished" :immediate-check=false @load="onLoad">
  243. <div class="list-nav" v-for="(item,index) in rewardList" :key="index">
  244. <div class="user">
  245. <img :src="standarImg(item.headImgUrl)" class="tou" :onerror="defaultImg" alt="">
  246. <div class="text">
  247. <p>{{item.surfaceName}}</p>
  248. <p>{{item.createTime}}</p>
  249. </div>
  250. </div>
  251. <div class="right-nav">
  252. <p>星动天卡</p>
  253. <p class="btn" @click='goGetReward' v-if='item.receiveStatus==0'>领取</p>
  254. <p class="btn isdisabled" v-if='item.receiveStatus==1'>已领取</p>
  255. </div>
  256. </div>
  257. </van-list>
  258. </div>
  259. <div class="no-user" v-if='rewardList.length==0'>
  260. <p>
  261. 暂无用户注册
  262. </p>
  263. </div>
  264. </div>
  265. <div class="rule-box">
  266. <!-- <img src="../static/offImg/title-bg.png" alt=""></img> -->
  267. <div class="title-box">
  268. <div class="img-box">活动规则</div>
  269. </div>
  270. <div class="rule">
  271. <p>1.分享双子星攻略文章至微信好友/微信朋友圈/QQ,好友注册成功后,分享者即可获得1小时星动套餐时长。</p>
  272. <p>2.用户通过该分享链接获取的激活码,只针对新注册用户有效领取并兑换一次。</p>
  273. <p>3.分享者每日最多获得10位好友的注册奖励,且奖励为当日有效,奖励过期不补发。</p>
  274. <p>4.分享者若没有云机,需要先创建星动云机才可继续领取奖励。</p>
  275. <p>5.新用户领取的激活码需在有效期内使用,若超过有效期则激活码失效。</p>
  276. </div>
  277. </div>
  278. </div>
  279. </div>
  280. <script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
  281. <script src="../static/js/vender/vue/axios.min.js"></script>
  282. <script src="../static/js/vender/vue/config.js"></script>
  283. <script src="../static/js/vender/vue/api.js"></script>
  284. <script type="text/javascript">
  285. var u = navigator.userAgent,
  286. app = navigator.appVersion;
  287. var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; //g
  288. var isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
  289. new Vue({
  290. el: '#app',
  291. data: {
  292. isshow: false,
  293. id: GetRequest().id ? GetRequest().id : 404,
  294. topic: {},
  295. rewardList: [],
  296. queryParams: {
  297. pageNum: 1,
  298. pageSize: 5
  299. },
  300. isDisable: false,
  301. finished: false,
  302. loading: false,
  303. finishedText: '没有更多了',
  304. offset: 100,
  305. total: 0,
  306. shareInfo: {},
  307. defaultImg: 'this.src="' + "../static/offImg/tou.png" + '"',
  308. actStatus: 0, //0活动状态 1开始
  309. marqueeList: [],
  310. token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyYW5kb20iOiIxNjc1OCIsImNsaWVudCI6IjAiLCJleHAiOjE2NDAyMTM3MDIsInVzZXJuYW1lIjoiYWRtaW4ifQ.3iGCT3FN0WByQHYebuiB4vSAnuuuU16znr8h0H-6jZE',
  311. },
  312. created() {
  313. this.getAwardPage(); //获取奖励列表
  314. },
  315. mounted() {
  316. this.getActDetail();
  317. this.getMarquee(); //跑马灯
  318. //this.getList();
  319. },
  320. methods: {
  321. goReward() {
  322. if (this.actStatus != 1) {
  323. return
  324. }
  325. const {
  326. title,
  327. content,
  328. gotoUrl,
  329. shareImg
  330. } = this.shareInfo;
  331. if (isAndroid) {
  332. window.native.share(title, content, gotoUrl, shareImg)
  333. } else if (isIOS) {
  334. }
  335. },
  336. standarImg(id) {
  337. return `${fileCenterApi}/file-center/fileOperate/getImage?id=${id}`;
  338. },
  339. getActDetail() { //获取活动状态
  340. this.$toast.loading({
  341. duration: 0,
  342. message: '加载中...',
  343. forbidClick: true,
  344. loadingType: 'spinner',
  345. });
  346. getActDetail(this.token).then(res => {
  347. this.$toast.clear();
  348. if (res.status === 0) {
  349. this.actStatus = res.data.actStatus;
  350. this.shareInfo = res.data;
  351. } else {
  352. this.$toast(res.msg);
  353. }
  354. })
  355. },
  356. getAwardPage() { //获取活动列表
  357. getAwardPage(this.token, this.queryParams).then(res => {
  358. if (res.status == 0) {
  359. this.loading = false //取消正在加载状态
  360. let infolist = res.data.list;
  361. if (infolist) {
  362. this.rewardList = this.rewardList.concat(infolist);
  363. if (infolist.length < this.queryParams.pageSize) { //判断接口返回数据量小于请求数据量,则表示此为最后一页
  364. this.finished = true;
  365. }
  366. } else {
  367. this.finished = true;
  368. }
  369. } else {
  370. this.$toast(res.msg);
  371. this.loading = false
  372. if (this.queryParams.pageNum > 1) {
  373. this.queryParams.pageNum -= 1
  374. }
  375. }
  376. })
  377. },
  378. //滚动加载时触发,list组件定义的方法
  379. onLoad() {
  380. let times = setTimeout(() => {
  381. this.queryParams.pageNum += 1 //每请求一次,页面数+1
  382. this.getAwardPage();
  383. clearTimeout(times)
  384. }, 500)
  385. },
  386. getMarquee() {
  387. getMarquee().then(res => {
  388. if (res.status === 0) {
  389. this.marqueeList = res.data;
  390. } else {
  391. this.$toast(res.msg);
  392. }
  393. })
  394. },
  395. goGetReward() {
  396. if (isAndroid) {
  397. window.native.activatePhone(1, 0)
  398. } else if (isIOS) {
  399. }
  400. },
  401. download() {
  402. },
  403. }
  404. })
  405. </script>
  406. </body>
  407. </html>