Parcourir la source

feat(邀请好友): 修改

zengzhixiang il y a 2 ans
Parent
commit
e552f83d56
1 fichiers modifiés avec 19 ajouts et 18 suppressions
  1. 19 18
      pages/activity/invite-user/index.vue

+ 19 - 18
pages/activity/invite-user/index.vue

@@ -104,16 +104,16 @@ export default {
   // auth: false,
   name: 'InviteUser',
   filters: {},
-  async asyncData({ $axios }) {
-    // 页面初始化前触发
-    const res = await $axios.$get(
-      '/activity/v1/inviteUser/orderRelation/starCoinOverview',
-    );
-    res.data.type = 2;
-    return {
-      data: res.data,
-    };
-  },
+  // async asyncData({ $axios }) {
+  //   // 页面初始化前触发
+  //   const res = await $axios.$get(
+  //     '/activity/v1/inviteUser/orderRelation/starCoinOverview',
+  //   );
+  //   res.data.type = 2;
+  //   return {
+  //     data: res.data,
+  //   };
+  // },
   data() {
     return {
       data: {
@@ -127,6 +127,7 @@ export default {
         inviteUserName: null,
         activityId: null,
         status: 0,
+        type: 1,
       },
       activityRules: '',
       myActivationCode: [],
@@ -135,7 +136,7 @@ export default {
   async fetch() {
     // 页面初始化后触发
     try {
-      // await this.getActiveInfo();
+      await this.getActiveInfo();
       this.$native.setShareInfo(this.shareInfo);
       await Promise.all([
         this.getActivityRules(),
@@ -248,13 +249,13 @@ export default {
     //   });
   },
   methods: {
-    // async getActiveInfo() {
-    //   const res = await this.$axios.$get(
-    //     '/activity/v1/inviteUser/orderRelation/starCoinOverview',
-    //   );
-    //   res.data.type = 2;
-    //   this.data = res.data;
-    // },
+    async getActiveInfo() {
+      const res = await this.$axios.$get(
+        '/activity/v1/inviteUser/orderRelation/starCoinOverview',
+      );
+      // res.data.type = 2;
+      this.data = res.data;
+    },
     async getMyActivationCode() {
       const res = await this.$axios.$get(
         '/activity/v1/inviteUser/orderRelation/myActivationCode',