Parcourir la source

通过方法getToken()获取token

huangxiaojing il y a 2 ans
Parent
commit
c3fcb9e02f
1 fichiers modifiés avec 6 ajouts et 2 suppressions
  1. 6 2
      pages/activity/invite-user/guide.vue

+ 6 - 2
pages/activity/invite-user/guide.vue

@@ -23,8 +23,12 @@ export default {
       token: ''
     }
   },
-  fetch() {
-    this.token = this.$route.query.token;
+  async fetch() {
+    if (this.$userAgent.isAndroid) {
+      this.token = await window.native.getToken();
+    } else {
+      this.token = this.$route.query.token;
+    }
   },
   computed: {
     videoURL() {