fission.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972
  1. <template>
  2. <v-container class="invite-user" fluid :class="`bg-${type}`">
  3. <div class="rule" @click="show = true">规则</div>
  4. <div class="box1">
  5. <div class="fcnc">
  6. <div v-for="(item, index) in level.levelAwardDetails" :key="item.goodsId">
  7. <div v-if="index < 4" class="cybz-content-container">
  8. <v-img class="cybz-content" :src="returnContent[index].img" />
  9. <div class="cybz-content-text">{{returnContent[index].content}}</div>
  10. <img v-if="item.status === 0" class="w76h24" src="~/assets/image/activity/invite-user/btn-3.png" alt="">
  11. <img v-else-if="item.status === 1" class="w76h24" src="~/assets/image/activity/invite-user/btn-1.png" alt="" @click="receiveLevelAward(item.goodsId)">
  12. <img v-else-if="item.status === 2" class="w76h24" src="~/assets/image/activity/invite-user/btn-2.png" alt="">
  13. </div>
  14. </div>
  15. </div>
  16. <v-btn v-if="received" class="share-button" rounded @click="share()">
  17. 云机免费领取
  18. </v-btn>
  19. <v-btn v-else class="share-button" rounded @click="share()">
  20. 赶紧分享你的好友,送云机时长
  21. </v-btn>
  22. <div class="dqdj-content">
  23. <div class="dqdj-item">
  24. <div class="dqdj-title">{{ level.currentLevelName }}</div>
  25. <div class="dqdj-text">当前等级</div>
  26. </div>
  27. <div class="dqdj-content-line"></div>
  28. <div class="dqdj-item">
  29. <div class="dqdj-title">{{ level.shareFriendCount }}</div>
  30. <div class="dqdj-text">分享好友数</div>
  31. </div>
  32. <div class="dqdj-content-line"></div>
  33. <div class="dqdj-item">
  34. <div class="dqdj-title">{{ level.boostValue }}</div>
  35. <div class="dqdj-text">累计助力值</div>
  36. </div>
  37. </div>
  38. <div class="progress">
  39. <div class="progress-box" :style="`width: ${width}px`"></div>
  40. <div class="progress-list">
  41. <div v-for="item in level.levelAwardDetails" :key="item.goodsId" class="fnc">
  42. <img v-if="item.status === 0" class="wh38" src="~/assets/image/activity/invite-user/box-gray.png" alt="">
  43. <img v-else-if="item.status === 1" class="wh38" src="~/assets/image/activity/invite-user/box-close.png" alt="" @click="receiveLevelAward(item.goodsId)">
  44. <img v-else-if="item.status === 2" class="wh38" src="~/assets/image/activity/invite-user/box-open.png" alt="">
  45. <span class="progress-text">{{ item.levelName }}</span>
  46. </div>
  47. </div>
  48. </div>
  49. </div>
  50. <div v-if="type === 2" :class="current ? 'box3 tab2' : 'box3'">
  51. <div class="tab">
  52. <div class="tab-item" @click="current = 0">{{ current === 1 ? '我的奖励' : '' }}</div>
  53. <div class="tab-item" @click="current = 1">{{ current === 1 ? '排行榜' : '' }}</div>
  54. </div>
  55. <div v-show="current === 0">
  56. <div v-if="myActivationCode.length" class="code-table">
  57. <div class="table-header">
  58. <table class="w-full">
  59. <colgroup>
  60. <col class="time-col" />
  61. <col class="code-col" />
  62. <col class="award-col" />
  63. <col class="status-col" />
  64. </colgroup>
  65. <thead class="text-left text-sm whitespace-nowrap break-normal">
  66. <tr>
  67. <th class="text-center">获取的时间</th>
  68. <th class="text-center">激活码编号</th>
  69. <th class="text-center">奖励内容</th>
  70. <th class="text-center">使用状态</th>
  71. </tr>
  72. </thead>
  73. </table>
  74. </div>
  75. <div class="table-body">
  76. <table class="w-full">
  77. <colgroup>
  78. <col class="time-col" />
  79. <col class="code-col" />
  80. <col class="award-col" />
  81. <col class="status-col" />
  82. </colgroup>
  83. <tbody class="text-xs">
  84. <tr v-for="(item, index) in myActivationCode" :key="index">
  85. <td class="whitespace-nowrap break-normal text-center">
  86. {{ item.createTime | formatDate('MM月DD日 HH:mm') }}
  87. </td>
  88. <td class="whitespace-nowrap break-normal text-center">
  89. <div class="flex">
  90. <span class="font-mono">{{ item.activationCode | activationCodeMask }} </span><span class="mx-1">|</span>
  91. <v-btn text small color="#FF9616" class="copy-btn" @click="copyCode(item)">复制</v-btn>
  92. </div>
  93. </td>
  94. <td class="whitespace-nowrap break-normal text-center">
  95. {{ item.awardStr }}
  96. </td>
  97. <td class="whitespace-nowrap break-normal text-center">
  98. <span :style="item.activationUse ? 'color: #FF1D02' : '#333333'">{{ ['未使用', '已使用', '已过期'][item.activationUse] }}</span>
  99. </td>
  100. </tr>
  101. </tbody>
  102. </table>
  103. <div v-if="myActivationCode.length" v-intersect.quiet="codeLoadMoreIntersect" class="flex item-center justify-center">
  104. <v-btn :loading="codeIsLoading" text small>
  105. <template v-if="codeIsLoading">加载中</template>
  106. <template v-else-if="codeHasMore">加载更多</template>
  107. <template v-else>没有更多</template>
  108. </v-btn>
  109. </div>
  110. </div>
  111. </div>
  112. <div v-else class="fwc">
  113. <img src="~/assets/image/activity/invite-user/noReward@2x.png" alt="">
  114. </div>
  115. </div>
  116. <div v-show="current === 1">
  117. <div v-if="levelAwardRankings.length" class="code-table">
  118. <div class="mylevel">
  119. <div class="fcw">
  120. <span class="c8F8F8F">当前排名</span>
  121. <span>{{ currentRanking > 0 ? currentRanking : '暂未上榜' }}</span>
  122. </div>
  123. <div class="fcw">
  124. <span class="c8F8F8F">本轮助力值</span>
  125. <span>{{ boostValue }}</span>
  126. </div>
  127. <div class="fcw">
  128. <span class="c8F8F8F">距上一名</span>
  129. <span>{{ preRanking > 0 ? preRanking : '/' }}</span>
  130. </div>
  131. <div class="fcw">
  132. <span class="c8F8F8F">距本轮排行结束时间</span>
  133. <span>
  134. <van-count-down :time="currentEndTime * 1000" format="DD 天 HH 时 mm 分 ss 秒" />
  135. </span>
  136. </div>
  137. </div>
  138. <div class="table-header">
  139. <table class="w-full">
  140. <colgroup>
  141. <col class="num-col" />
  142. <col class="user-col" />
  143. <col class="friend-col" />
  144. <col class="award-col" />
  145. </colgroup>
  146. <thead class="text-sm whitespace-nowrap break-normal">
  147. <tr>
  148. <th class="text-center">排名</th>
  149. <th class="text-center">用户</th>
  150. <th class="text-center">好友助力值</th>
  151. <th class="text-center">排名奖励</th>
  152. </tr>
  153. </thead>
  154. </table>
  155. </div>
  156. <div class="table-body">
  157. <table class="w-full">
  158. <colgroup>
  159. <col class="num-col" />
  160. <col class="user-col" />
  161. <col class="friend-col" />
  162. <col class="award-col" />
  163. </colgroup>
  164. <tbody class="text-xs">
  165. <tr v-for="(item, index) in levelAwardRankings" :key="index">
  166. <td class="whitespace-nowrap break-normal text-center">
  167. <img v-if="item.ranking === 1" class="w24h28" src="~/assets/image/activity/invite-user/no1.png" alt="">
  168. <img v-else-if="item.ranking === 2" class="w24h28" src="~/assets/image/activity/invite-user/no2.png" alt="">
  169. <img v-else-if="item.ranking === 3" class="w24h28" src="~/assets/image/activity/invite-user/no3.png" alt="">
  170. <span v-else>{{ item.ranking }}</span>
  171. </td>
  172. <td class="whitespace-nowrap break-normal text-center">
  173. {{ item.userName }}
  174. </td>
  175. <td class="whitespace-nowrap break-normal text-center">
  176. {{ item.boostValue }}
  177. </td>
  178. <td class="whitespace-nowrap break-normal text-center">
  179. {{ item.awardStr }}
  180. </td>
  181. </tr>
  182. </tbody>
  183. </table>
  184. </div>
  185. </div>
  186. <div v-else class="fwc">
  187. <img src="~/assets/image/activity/invite-user/nodata.png" alt="">
  188. </div>
  189. </div>
  190. </div>
  191. <img class="w373h192" src="~/assets/image/activity/invite-user/rule2.png" alt="">
  192. <van-popup v-model="show" style="background: transparent;padding-bottom: 60px;width: 100%;">
  193. <activity-invite-user-box class="box4">
  194. <template #title>活动规则</template>
  195. <div class="text-sm" v-html="activityRules"></div>
  196. </activity-invite-user-box>
  197. <van-icon name="close" class="close1" color="#939393" @click="show = false;" />
  198. </van-popup>
  199. </v-container>
  200. </template>
  201. <script>
  202. import { Toast } from 'vant';
  203. // import NativeShare from 'nativeshare';
  204. // import { fileKeyToUrl } from '@/plugins/file-center.js';
  205. export default {
  206. auth: false,
  207. name: 'Fission',
  208. filters: {
  209. activationCodeMask(value) {
  210. return value.replace(/(.{2})(.*)(.{2}$)/, '$1**$3');
  211. },
  212. timeStamp(StatusMinute) {
  213. const day = parseInt(StatusMinute / 60 / 60 / 24);
  214. const hour = parseInt((StatusMinute / 60 / 60) % 24);
  215. const min = parseInt(StatusMinute / 60 % 60);
  216. StatusMinute = '';
  217. if (day > 0) {
  218. StatusMinute = day + '天';
  219. }
  220. if (hour > 0) {
  221. StatusMinute += hour + '小时';
  222. }
  223. if (min > 0) {
  224. StatusMinute += parseFloat(min) + '分钟';
  225. }
  226. return StatusMinute;
  227. }
  228. },
  229. data() {
  230. return {
  231. show: false,
  232. current: 0,
  233. data: {
  234. todayIncomeStarCoin: 0,
  235. totalIncomeStarCoin: 0,
  236. todayBuyOrderCount: 0,
  237. totalBuyOrderCount: 0,
  238. todayBuyOrderSuccessCount: 0,
  239. totalBuyOrderSuccessCount: 0,
  240. withdrawStarCoinNum: 0,
  241. inviteUserName: null,
  242. activityId: null,
  243. status: 0,
  244. type: 2
  245. },
  246. level: {
  247. currentLevelName: '',
  248. activityId: '',
  249. levelAwardDetails: [],
  250. shareFriendCount: 0,
  251. boostValue: 0
  252. },
  253. activityRules: '',
  254. myActivationCode: [],
  255. levelAwardRankings: [],
  256. myCodeFrom: {
  257. activityId: null,
  258. pageNum: 1,
  259. pageSize: 8,
  260. },
  261. codeTotal: -1,
  262. codeIsLoading: false,
  263. client: 1,
  264. token: '',
  265. width: 0,
  266. boostValue: 0,
  267. currentEndTime: 0,
  268. currentRanking: 0,
  269. preRanking: 0,
  270. userType: 1,
  271. received: 0,
  272. // shareInfo: {
  273. // title: '双子星云手机',
  274. // content: `免费领取一台全能云手机!`,
  275. // shareUrl: '',
  276. // shareImage: ''
  277. // },
  278. showShare: false,
  279. returnContent: [{
  280. img: require('@/assets/image/activity/invite-user/card-1.png'),
  281. content: '奖励一&邀请1人注册',
  282. },
  283. {
  284. img: require('@/assets/image/activity/invite-user/card-2.png'),
  285. content: '奖励二&邀请2人注册',
  286. },
  287. {
  288. img: require('@/assets/image/activity/invite-user/card-3.png'),
  289. content: '奖励三&邀请3人注册',
  290. },
  291. {
  292. img: require('@/assets/image/activity/invite-user/card-4.png'),
  293. content: '奖励四&邀请5人注册',
  294. }]
  295. };
  296. },
  297. async fetch() {
  298. // 页面初始化后触发
  299. try {
  300. this.token = this.$route.query.token;
  301. await this.getActiveInfo();
  302. this.$native.setShareInfo(this.shareInfo);
  303. await this.shareCanReceiveCloudPhone();
  304. await Promise.all([
  305. this.getActivityRules(),
  306. this.type === 2 && this.getMyActivationCode(this.myCodeFrom),
  307. this.myCodeFrom.activityId && this.getRanking({ activityId: this.myCodeFrom.activityId })
  308. ]);
  309. } catch (error) {
  310. Toast({
  311. message: error.message,
  312. duration: 4000
  313. });
  314. }
  315. if (this.$userAgent.isSzx && this.$userAgent.isAndroid) {
  316. this.client = 1;
  317. } else if (this.$userAgent.isSzx && this.$userAgent.isIos) {
  318. this.client = 2;
  319. } else if (this.$userAgent.isMiniProgram) {
  320. this.client = 5;
  321. } else {
  322. this.client = 7;
  323. }
  324. },
  325. head: {
  326. title: '邀请好友'
  327. },
  328. computed: {
  329. codeHasMore() {
  330. return (
  331. this.codeTotal < 0 ||
  332. this.myCodeFrom.pageNum * this.myCodeFrom.pageSize < this.codeTotal
  333. );
  334. },
  335. dataList() {
  336. switch (this.type) {
  337. case 1: {
  338. return [
  339. { label: '邀请用户总数', value: this.data.totalPromoter },
  340. { label: '购买总订单数', value: this.data.totalBuyOrderCount }
  341. ];
  342. }
  343. case 2: {
  344. return [
  345. { label: '邀请用户总数', value: this.data.totalPromoter },
  346. { label: '购买总订单数', value: this.data.totalBuyOrderCount }
  347. ];
  348. }
  349. case 3: {
  350. return [
  351. { label: '邀请用户总数', value: this.data.totalPromoter },
  352. { label: '购买总订单数', value: this.data.totalBuyOrderCount }
  353. ];
  354. }
  355. default: {
  356. return [];
  357. }
  358. }
  359. },
  360. type() {
  361. return 2;
  362. },
  363. shareUrl() {
  364. return (
  365. location.origin +
  366. this.$router.resolve({
  367. path: '/activity/invite-user/register-fission/',
  368. query: {
  369. invitationUserName: this.data.inviteUserName,
  370. activityId: this.data.activityId,
  371. type: this.type,
  372. },
  373. }).href
  374. );
  375. },
  376. shareInfo() {
  377. if (this.$userAgent.isMiniProgram) {
  378. return {
  379. title: '双子星APP',
  380. path: '/pages/home/home',
  381. imgUrl: location.origin + require('~/assets/image/logo.png'),
  382. };
  383. }
  384. return {
  385. title: '双子星云手机',
  386. desc: `畅玩“原神”“幻塔”,24小时在线,不限下载流量的手机`,
  387. link: this.shareUrl,
  388. imgUrl: location.origin + require('~/assets/image/logo.png'),
  389. };
  390. }
  391. },
  392. mounted() {
  393. this.makePoint('activity_Share_PV')
  394. this.makePoint('activity_Share_UV')
  395. this.addUserVisit(12);
  396. },
  397. methods: {
  398. async shareCanReceiveCloudPhone() {
  399. try {
  400. const res = await this.$axios.$get('/resources/register/send/cloud/phone/shareCanReceiveCloudPhone', {}, { headers: { Authorization: this.token } });
  401. this.received = res.data.received
  402. // this.shareInfo.title = res.data.title
  403. // this.shareInfo.content = res.data.content
  404. // this.shareInfo.shareUrl = res.data.url
  405. // this.shareInfo.shareImage = fileKeyToUrl(res.data.imgUrl)
  406. // this.$native.setShareInfo(this.shareInfo);
  407. } catch (err) {
  408. Toast({
  409. message: err.message,
  410. position: 'top'
  411. });
  412. }
  413. },
  414. async receiveLevelAward(goodsId) {
  415. try {
  416. const res = await this.$axios.$post('/activity/v1/level/award/receiveLevelAward', { activityId: this.myCodeFrom.activityId, goodsId }, { headers: { Authorization: this.token } });
  417. Toast({
  418. message: res.msg,
  419. position: 'top'
  420. });
  421. if (this.myCodeFrom.activityId) {
  422. await this.myLevelAward();
  423. }
  424. this.myCodeFrom.pageNum = 1;
  425. this.myActivationCode = [];
  426. this.getMyActivationCode(this.myCodeFrom);
  427. if (this.myCodeFrom.activityId) {
  428. this.getRanking({ activityId: this.myCodeFrom.activityId });
  429. }
  430. } catch (err) {
  431. Toast({
  432. message: err.message,
  433. position: 'top'
  434. });
  435. }
  436. },
  437. async myLevelAward() {
  438. const res = await this.$axios.$get(`/activity/v1/level/award/myLevelAward?activityId=${this.myCodeFrom.activityId}`, { headers: { Authorization: this.token } });
  439. this.level = res.data;
  440. if (this.level.levelAwardDetails) {
  441. this.width = 0;
  442. const levelLength = 280 / (this.level.levelAwardDetails.length - 1)
  443. this.level.levelAwardDetails.forEach((item, index) => {
  444. if (item.status > 0) {
  445. if (index > 0) {
  446. this.width += levelLength
  447. }
  448. if (index === 0 || index === this.level.levelAwardDetails.length - 1) {
  449. this.width += 14
  450. }
  451. }
  452. })
  453. }
  454. },
  455. async getActiveInfo() {
  456. const res = await this.$axios.$get('/activity/v1/inviteUser/orderRelation/starCoinOverview', { headers: { Authorization: this.token } });
  457. this.data = res.data;
  458. this.myCodeFrom.activityId = res.data.activityId;
  459. if (this.myCodeFrom.activityId) {
  460. await this.myLevelAward();
  461. }
  462. },
  463. async getMyActivationCode(params) {
  464. try {
  465. this.codeIsLoading = true;
  466. const res = await this.$axios.$get('/activity/v1/inviteUser/orderRelation/myActivationCode', { params, headers: { Authorization: this.token } });
  467. this.codeTotal = res.data.total;
  468. this.myActivationCode.push(
  469. ...(res.data.list ?? [])
  470. );
  471. this.myCodeFrom = params;
  472. } finally {
  473. this.codeIsLoading = false;
  474. }
  475. },
  476. async getRanking(params) {
  477. try {
  478. this.codeIsLoading = true;
  479. const res = await this.$axios.$get('/activity/v1/level/award/ranking', { params, headers: { Authorization: this.token } });
  480. this.boostValue = res.data.boostValue
  481. this.currentEndTime = res.data.currentEndTime
  482. this.currentRanking = res.data.currentRanking
  483. this.preRanking = res.data.preRanking
  484. this.levelAwardRankings = res.data.levelAwardRankings;
  485. this.userType = res.data.userType;
  486. } finally {
  487. this.codeIsLoading = false;
  488. }
  489. },
  490. async share() {
  491. if (this.data.status !== 1) {
  492. if (this.data.status === 0) {
  493. Toast({
  494. message: '当前活动已过期',
  495. position: 'top'
  496. });
  497. return
  498. }
  499. if (this.data.status === 2) {
  500. Toast({
  501. message: '当前活动未开启',
  502. position: 'top'
  503. });
  504. return
  505. }
  506. if (this.data.status === 3) {
  507. Toast({
  508. message: '当前活动已结束',
  509. position: 'top'
  510. });
  511. return
  512. }
  513. Toast({
  514. message: '未知活动状态',
  515. position: 'top'
  516. });
  517. return
  518. }
  519. this.$tongji.trackEvent('活动', '分享', '', 0);
  520. if (this.received) {
  521. this.addUserVisit(13);
  522. }
  523. console.log('env',this.$userAgent.isSzx , this.$userAgent.isSzxBrowser)
  524. if (this.$userAgent.isSzx || this.$userAgent.isSzxBrowser) {
  525. // app环境
  526. this.$native.share(this.shareInfo);
  527. console.log(this.shareInfo,'xxxx');
  528. this.makePoint('activity_Share_分享好友按钮');
  529. } else {
  530. // 浏览器环境
  531. await this.$native.clipboard.writeText(`${this.shareUrl} 双子星云手机`);
  532. // throw new Error('1231');
  533. this.$toast.success('链接复制成功');
  534. this.makePoint('activity_Share_复制链接');
  535. }
  536. },
  537. makePoint(positionButton) {
  538. this.$axios.$post('/public/v5/buriedPointRecord/reportRecords', [
  539. {
  540. client: this.client,
  541. eventCode: '28_分享活动',
  542. userName: this.$auth.user.username,
  543. positionButton,
  544. operationTime: this.getCurrentTime(),
  545. phoneNumber: this.$auth.user.phone,
  546. deviceId: ''
  547. },
  548. ]);
  549. },
  550. getCurrentTime() {
  551. const date = new Date(); // 当前时间
  552. const year = date.getFullYear() // 年
  553. const month = this.repair(date.getMonth() + 1); // 月
  554. const day = this.repair(date.getDate()); // 日
  555. const hour = this.repair(date.getHours()); // 时
  556. const minute = this.repair(date.getMinutes()); // 分
  557. const second = this.repair(date.getSeconds()); // 秒
  558. // 当前时间
  559. const curTime = year + "-" + month + "-" + day +
  560. " " + hour + ":" + minute + ":" + second;
  561. return curTime;
  562. },
  563. repair(i) {
  564. if (i >= 0 && i <= 9) {
  565. return "0" + i;
  566. } else {
  567. return i;
  568. }
  569. },
  570. async getActivityRules() {
  571. const agreementCoding = {
  572. 1: 'iuserrules01',
  573. 2: 'iuserrules02',
  574. 3: 'iuserrules03',
  575. }[this.type];
  576. if (agreementCoding) {
  577. const res = await this.$axios.$get(
  578. '/public/v4/agreement/content/getContentByType',
  579. {
  580. params: {
  581. agreementCoding,
  582. type: 1,
  583. },
  584. },
  585. );
  586. this.activityRules = res.data.content
  587. .replace(/[\d\D]*<body>([\d\D]+)<\/body>[\d\D]*/i, '$1')
  588. .replace(/<div class="phone-container">([\d\D]+)<\/div>/g, '$1');
  589. }
  590. },
  591. async copyCode(item) {
  592. await this.$native.clipboard.writeText(item.activationCode);
  593. Toast({
  594. message: '复制激活码,请在【我的-兑换中心】兑换'
  595. });
  596. this.makePoint('activity_Share_激活码复制')
  597. },
  598. codeLoadMoreIntersect(event) {
  599. if (event[0].isIntersecting && this.codeHasMore && !this.codeIsLoading) {
  600. this.getMyActivationCode({
  601. ...this.myCodeFrom,
  602. pageNum: this.myCodeFrom.pageNum + 1,
  603. });
  604. }
  605. },
  606. addUserVisit(accessType) {
  607. this.$axios.$post('/user/v5/operateApi/addUserVisit', {
  608. accessType,
  609. loginType: 1
  610. });
  611. }
  612. }
  613. };
  614. </script>
  615. <style lang="scss" scoped>
  616. .w76h24 {
  617. width: 76px;
  618. height: 24px;
  619. margin: 5px 0;
  620. }
  621. .w373h237 {
  622. width: 373px;
  623. height: 237px;
  624. display: block;
  625. }
  626. .fcnc {
  627. display: flex;
  628. flex-wrap: wrap;
  629. margin-top: 51px;
  630. justify-content: center;
  631. }
  632. .w373h192 {
  633. width: 373px;
  634. height: 192px;
  635. display: block;
  636. margin: 17px auto 0;
  637. }
  638. .fcw {
  639. display: flex;
  640. flex-direction: column;
  641. justify-content: center;
  642. align-items: center;
  643. font-size: 12px;
  644. color: #333333;
  645. }
  646. .c8F8F8F {
  647. color: #8F8F8F;
  648. margin-bottom: 8px;
  649. }
  650. .mylevel {
  651. width: 358px;
  652. height: 68px;
  653. background: #FFFFFF;
  654. box-shadow: 0px 2px 16px 0px rgba(243, 93, 67, 0.22);
  655. border-radius: 6px;
  656. margin-left: -12px;
  657. margin-top: 20px;
  658. margin-bottom: 20px;
  659. display: flex;
  660. justify-content: space-around;
  661. align-items: center;
  662. }
  663. .rule {
  664. width: 24px;
  665. height: 56px;
  666. line-height: 28px;
  667. background: rgba(0, 0, 0, 0.19);
  668. border-radius: 6px 0px 0px 6px;
  669. font-size: 15px;
  670. font-weight: 400;
  671. color: #FFFFFF;
  672. position: absolute;
  673. right: 0;
  674. top: 28px;
  675. text-align: center;
  676. }
  677. .close1 {
  678. font-size: 30px;
  679. text-align: center;
  680. display: block;
  681. }
  682. .fwc {
  683. text-align: center;
  684. img {
  685. width: 75px;
  686. height: 83px;
  687. margin-top: 120px;
  688. }
  689. }
  690. .invite-user {
  691. color: #333;
  692. background-size: 100% auto;
  693. overflow: hidden;
  694. padding: 0;
  695. padding-bottom: env(safe-area-inset-bottom, 30px);
  696. background-color: #F67350;
  697. &.bg-1 {
  698. background-image: url('~/assets/image/activity/invite-user/bg@2x.png');
  699. }
  700. &.bg-2 {
  701. background-image: url('~/assets/image/activity/invite-user/bg-6@2x.png');
  702. }
  703. &.bg-3 {
  704. background-image: url('~/assets/image/activity/invite-user/bg-3@2x.png');
  705. }
  706. }
  707. .box1 {
  708. margin: 240px auto 0;
  709. width: 373px;
  710. height: 648px;
  711. background: url('~/assets/image/activity/invite-user/box.png');
  712. background-size: 100% 100%;
  713. overflow: hidden;
  714. .cybz-content-container {
  715. display: flex;
  716. flex-direction: column;
  717. justify-content: center;
  718. align-items: center;
  719. width: 140px;
  720. }
  721. .cybz-content {
  722. width: 119px;
  723. height: 108px;
  724. margin: auto;
  725. display: block;
  726. }
  727. .cybz-content-text {
  728. font-size: 12px;
  729. color: #FF6F3C;
  730. }
  731. .share-button {
  732. display: block;
  733. margin: auto;
  734. width: 302px !important;
  735. height: 62px !important;
  736. background-image: url('~/assets/image/activity/invite-user/share-button@2x.png');
  737. background-size: 100% 100%;
  738. margin-top: 24px;
  739. color: #dd1b0d;
  740. font-size: 18px;
  741. font-weight: bold;
  742. }
  743. .dqdj-content {
  744. width: 308px;
  745. height: 71px;
  746. background: #f9f1f5;
  747. border-radius: 6px;
  748. margin: 15px auto 0;
  749. display: flex;
  750. align-items: center;
  751. justify-content: center;
  752. .dqdj-content-line {
  753. width: 1px;
  754. height: 32px;
  755. background: #ff1d02;
  756. opacity: 0.1;
  757. }
  758. .dqdj-item {
  759. width: 96px;
  760. text-align: center;
  761. }
  762. .dqdj-title {
  763. font-size: 14px;
  764. font-weight: 600;
  765. color: #ff1d02;
  766. line-height: 20px;
  767. margin-bottom: 3px;
  768. }
  769. .dqdj-text {
  770. font-size: 12px;
  771. font-weight: 400;
  772. color: #333333;
  773. line-height: 17px;
  774. }
  775. }
  776. .progress {
  777. width: 308px;
  778. height: 8px;
  779. background: #e8e8e8;
  780. border-radius: 4px;
  781. margin: 34px auto 33px;
  782. position: relative;
  783. .progress-box {
  784. height: 8px;
  785. background: linear-gradient(270deg, #ff8a00 0%, #ff4200 100%);
  786. border-radius: 4px;
  787. position: absolute;
  788. top: 0;
  789. left: 0;
  790. }
  791. .wh38 {
  792. width: 38px;
  793. height: 38px;
  794. }
  795. .fnc {
  796. display: flex;
  797. flex-direction: column;
  798. justify-content: center;
  799. align-items: center;
  800. }
  801. .progress-text {
  802. font-size: 12px;
  803. color: #8f8f8f;
  804. line-height: 17px;
  805. margin-top: 5px;
  806. }
  807. .progress-list {
  808. width: 298px;
  809. position: absolute;
  810. left: 5px;
  811. top: -19px;
  812. display: flex;
  813. justify-content: space-between;
  814. }
  815. }
  816. }
  817. .box2 {
  818. .value {
  819. color: #ff6600;
  820. }
  821. ::v-deep .box-main {
  822. padding-left: 20px;
  823. padding-right: 20px;
  824. }
  825. }
  826. .box3 {
  827. width: 345px;
  828. height: 523px;
  829. margin: 25px auto 0;
  830. background: url('~/assets/image/activity/invite-user/box2@2x.png');
  831. background-size: 100% 100%;
  832. padding: 0 4px;
  833. box-sizing: border-box;
  834. &.tab2 {
  835. background: url('~/assets/image/activity/invite-user/box@2x.png') !important;
  836. background-size: 100% 100% !important;
  837. height: 627px !important;
  838. }
  839. .tab {
  840. display: flex;
  841. width: 307px;
  842. justify-content: space-between;
  843. margin: 0 auto;
  844. .tab-item {
  845. width: 146px;
  846. height: 44px;
  847. text-align: center;
  848. line-height: 44px;
  849. font-size: 16px;
  850. font-weight: 500;
  851. color: #ffffff;
  852. }
  853. }
  854. ::v-deep .box-main {
  855. padding-left: 10px;
  856. padding-right: 10px;
  857. }
  858. }
  859. .code-table {
  860. .table-body {
  861. max-height: 430px;
  862. overflow-y: auto;
  863. }
  864. .time-col {
  865. width: 105px;
  866. }
  867. .code-col {
  868. width: 94px;
  869. }
  870. .award-col {
  871. width: 85px;
  872. }
  873. .status-col {
  874. width: 60px;
  875. }
  876. .num-col {
  877. width: 53px;
  878. text-align: center;
  879. }
  880. .user-col {
  881. width: 92px;
  882. text-align: center;
  883. }
  884. .friend-col {
  885. width: 85px;
  886. text-align: center;
  887. }
  888. .award-col {
  889. width: 96px;
  890. text-align: center;
  891. }
  892. tr {
  893. height: 40px;
  894. color: #8F8F8F;
  895. }
  896. td {
  897. height: 40px;
  898. color: #333;
  899. }
  900. .copy-btn {
  901. min-width: 0 !important;
  902. height: auto !important;
  903. padding: 0 !important;
  904. }
  905. }
  906. .box4::v-deep .box-main {
  907. padding-left: 10px;
  908. padding-right: 10px;
  909. }
  910. .table-header {
  911. margin: 0 2px;
  912. background: #F9F1F5;
  913. }
  914. .w24h28 {
  915. width: 24px;
  916. height: 28px;
  917. }
  918. </style>