Jelajahi Sumber

fix(pricing.vue):安卓接口联调

liyangbin 2 tahun lalu
induk
melakukan
5bde316ce6
1 mengubah file dengan 16 tambahan dan 7 penghapusan
  1. 16 7
      pages/pricing.vue

+ 16 - 7
pages/pricing.vue

@@ -2169,13 +2169,22 @@ export default {
       this.token = tokenChange
       // console.log(tokenChange)
       // alert("测试一下")
-      this.$store.commit('SET_TOKEN',tokenChange)
-      this.$axios.get('members/getMemberInfo').then((res)=> {
-        if(res.code === 200) {
-          this.$store.commit('setUser',res.result.memberInfo)
-          this.VIP = this.userInfo.subscriberType
-        }
-      })
+      if(tokenChange){
+        this.$store.commit('SET_TOKEN',tokenChange)
+        this.$axios.get('members/getMemberInfo').then((res)=> {
+          if(res.code === 200) {
+            this.$store.commit('setUser',res.result.memberInfo)
+            this.VIP = this.userInfo.subscriberType
+            this.getVipList()
+          }
+        })
+      }else{
+        this.$store.commit('SET_TOKEN',tokenChange)
+        this.$store.commit('setUser',{})
+        this.isLogin = false
+        this.VIP = this.userInfo.subscriberType
+        this.getVipList()
+      }
     }
     // call("bearer 971be38f-6cb5-4b09-a799-93fe3956bd96","member_v2","90416041")
     // console.log(this.app_version)