|
@@ -12,7 +12,9 @@
|
|
|
<div class="cybz-content-text-item">邀请购买云机</div>
|
|
|
<div class="cybz-content-text-item">返星币换现金</div>
|
|
|
</div>
|
|
|
- <v-btn class="share-button" rounded @click="share()">分享好友赚星币</v-btn>
|
|
|
+ <v-btn class="share-button" rounded @click="share()"
|
|
|
+ >分享好友赚星币</v-btn
|
|
|
+ >
|
|
|
<!-- <button @click="share()">邀请</button> -->
|
|
|
</div>
|
|
|
<!-- <div class="h-40">13</div> -->
|
|
@@ -101,12 +103,17 @@ export default {
|
|
|
withdrawStarCoinNum: 0,
|
|
|
inviteUserName: null,
|
|
|
activityId: null,
|
|
|
+ status: 0,
|
|
|
},
|
|
|
};
|
|
|
},
|
|
|
async fetch() {
|
|
|
//
|
|
|
- this.data = (await getStarCoinOverview(this)).data;
|
|
|
+ try {
|
|
|
+ this.data = (await getStarCoinOverview(this)).data;
|
|
|
+ } catch (error) {
|
|
|
+ this.$toast.error(error.message);
|
|
|
+ }
|
|
|
},
|
|
|
head: {
|
|
|
title: '邀请好友',
|
|
@@ -140,8 +147,10 @@ export default {
|
|
|
methods: {
|
|
|
async share() {
|
|
|
// console.log(this);
|
|
|
+ if (this.data.status !== 1) {
|
|
|
+ throw new Error('当前活动已失效');
|
|
|
+ }
|
|
|
this.$tongji.trackEvent('活动', '分享', '', 0);
|
|
|
-
|
|
|
const url =
|
|
|
location.origin +
|
|
|
this.$router.resolve({
|
|
@@ -254,7 +263,7 @@ export default {
|
|
|
background-size: 100% 100%;
|
|
|
margin-top: 24px;
|
|
|
// margin-bottom: 24px;
|
|
|
- color: #DD1B0D;
|
|
|
+ color: #dd1b0d;
|
|
|
font-size: 22px;
|
|
|
font-weight: bold;
|
|
|
}
|