|
@@ -2,10 +2,7 @@
|
|
|
<v-container class="invite-user" fluid :class="`bg-${type}`">
|
|
|
<activity-invite-user-box class="box1">
|
|
|
<template #title>参与步骤</template>
|
|
|
- <v-img
|
|
|
- class="cybz-content"
|
|
|
- :src="returnContent ? returnContent.img : null"
|
|
|
- />
|
|
|
+ <v-img class="cybz-content" :src="returnContent ? returnContent.img : null" />
|
|
|
<div class="cybz-content-text">
|
|
|
<div class="cybz-content-text-item">分享好友</div>
|
|
|
<div class="cybz-content-text-item">邀请购买云机</div>
|
|
@@ -14,22 +11,16 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<v-btn class="share-button" rounded @click="share()">
|
|
|
- <template v-if="!($userAgent.isSzx || $userAgent.isSzxBrowser)"
|
|
|
- >复制链接</template
|
|
|
- >分享好友
|
|
|
+ <template v-if="!($userAgent.isSzx || $userAgent.isSzxBrowser)">复制链接</template>分享好友
|
|
|
</v-btn>
|
|
|
<!-- <button @click="share()">邀请</button> -->
|
|
|
</activity-invite-user-box>
|
|
|
<activity-invite-user-box class="ox box2">
|
|
|
<template #title>收益明细</template>
|
|
|
<div class="grid grid-cols-2 gap-x-4 gap-y-8">
|
|
|
- <div
|
|
|
- v-for="(item, index) in dataList"
|
|
|
- :key="index"
|
|
|
- :class="{
|
|
|
+ <div v-for="(item, index) in dataList" :key="index" :class="{
|
|
|
'col-span-2': index === 6,
|
|
|
- }"
|
|
|
- >
|
|
|
+ }">
|
|
|
<div class="label text-sm">
|
|
|
<span>{{ item.label }}</span>
|
|
|
</div>
|
|
@@ -74,33 +65,18 @@
|
|
|
</td>
|
|
|
<td class="whitespace-nowrap break-normal">
|
|
|
<div class="flex">
|
|
|
- <span class="font-mono"
|
|
|
- >{{ item.activationCode | activationCodeMask }} </span
|
|
|
- ><span class="mx-1">|</span
|
|
|
- ><v-btn
|
|
|
- text
|
|
|
- small
|
|
|
- color="#991AD2"
|
|
|
- class="copy-btn"
|
|
|
- @click="copyCode(item)"
|
|
|
- >复制</v-btn
|
|
|
- >
|
|
|
+ <span class="font-mono">{{ item.activationCode | activationCodeMask }} </span><span class="mx-1">|</span>
|
|
|
+ <v-btn text small color="#991AD2" class="copy-btn" @click="copyCode(item)">复制</v-btn>
|
|
|
</div>
|
|
|
</td>
|
|
|
<td class="whitespace-nowrap break-normal text-right">
|
|
|
- <span v-if="item.activationUse" style="color: #dd1b0d"
|
|
|
- >已使用</span
|
|
|
- >
|
|
|
+ <span v-if="item.activationUse" style="color: #dd1b0d">已使用</span>
|
|
|
<span v-else>未使用</span>
|
|
|
</td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
- <div
|
|
|
- v-if="myActivationCode.length"
|
|
|
- v-intersect.quiet="codeLoadMoreIntersect"
|
|
|
- class="flex item-center justify-center"
|
|
|
- >
|
|
|
+ <div v-if="myActivationCode.length" v-intersect.quiet="codeLoadMoreIntersect" class="flex item-center justify-center">
|
|
|
<!-- <v-progress-circular indeterminate ></v-progress-circular> -->
|
|
|
<v-btn :loading="codeIsLoading" text small>
|
|
|
<template v-if="codeIsLoading">加载中</template>
|
|
@@ -145,6 +121,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import { Toast } from 'vant';
|
|
|
// import qs from 'qs';
|
|
|
// import clipboard from 'clipboardy/browser';
|
|
|
|
|
@@ -153,7 +130,7 @@
|
|
|
// import { getStarCoinOverview } from '~/api/activity/invite-user.js';
|
|
|
// import { getContentByType } from '~/api/public/agreement.js';
|
|
|
export default {
|
|
|
- // auth: false,
|
|
|
+ auth: false,
|
|
|
name: 'InviteUser',
|
|
|
filters: {
|
|
|
activationCodeMask(value) {
|
|
@@ -209,7 +186,10 @@ export default {
|
|
|
this.type === 2 && this.getMyActivationCode(this.myCodeFrom),
|
|
|
]);
|
|
|
} catch (error) {
|
|
|
- this.$toast.error(error.message);
|
|
|
+ Toast({
|
|
|
+ message: error.message,
|
|
|
+ duration: 4000
|
|
|
+ });
|
|
|
}
|
|
|
},
|
|
|
head: {
|
|
@@ -238,7 +218,7 @@ export default {
|
|
|
},
|
|
|
}[this.type];
|
|
|
},
|
|
|
- // contentImg() {
|
|
|
+ // contentImg() {.0
|
|
|
// return {
|
|
|
// 1: require('@/assets/image/activity/invite-user/cybz-content@2x.png'),
|
|
|
// 2: require('@/assets/image/activity/invite-user/cybz-content-2@2x.png'),
|
|
@@ -414,15 +394,31 @@ export default {
|
|
|
// console.log(this);
|
|
|
if (this.data.status !== 1) {
|
|
|
if (this.data.status === 0) {
|
|
|
- throw new Error('当前活动已过期');
|
|
|
+ Toast({
|
|
|
+ message: '当前活动已过期',
|
|
|
+ position: 'top'
|
|
|
+ });
|
|
|
+ return
|
|
|
}
|
|
|
if (this.data.status === 2) {
|
|
|
- throw new Error('当前活动未开启');
|
|
|
+ Toast({
|
|
|
+ message: '当前活动未开启',
|
|
|
+ position: 'top'
|
|
|
+ });
|
|
|
+ return
|
|
|
}
|
|
|
if (this.data.status === 3) {
|
|
|
- throw new Error('当前活动已结束');
|
|
|
+ Toast({
|
|
|
+ message: '当前活动已结束',
|
|
|
+ position: 'top'
|
|
|
+ });
|
|
|
+ return
|
|
|
}
|
|
|
- throw new Error('未知活动状态');
|
|
|
+ Toast({
|
|
|
+ message: '未知活动状态',
|
|
|
+ position: 'top'
|
|
|
+ });
|
|
|
+ return
|
|
|
}
|
|
|
|
|
|
this.$tongji.trackEvent('活动', '分享', '', 0);
|