Przeglądaj źródła

修改接口同步调用

aaa 3 lat temu
rodzic
commit
25a9b51267
1 zmienionych plików z 5 dodań i 5 usunięć
  1. 5 5
      src/views/home/index.vue

+ 5 - 5
src/views/home/index.vue

@@ -108,7 +108,7 @@ export default {
         // 从蓝信获取用户信息
         // this.getLanXinSignature();
         console.log("-从蓝信获取用户信息-");
-        this.getLanXinCode();
+        await this.getLanXinCode();
       } else {
         console.log("-从本地获取用户信息-");
         await this.$_http
@@ -244,8 +244,8 @@ export default {
         });
     },
     // 获取蓝信免登陆授权吗
-    getLanXinCode() {
-      lx.biz
+    async getLanXinCode() {
+      await lx.biz
         .getAuthCode({
           appId: process.env.VUE_APP_LANXIN_APPID
         })
@@ -256,9 +256,9 @@ export default {
         });
     },
     // 获取蓝信用户信息
-    getLanXinUserInfo(authCode) {
+    async getLanXinUserInfo(authCode) {
       let params = { authCode: authCode };
-      this.$_http
+      await this.$_http
         .get(this.$_API.JTXT_GET_LAN_XIN_USER_INFO, { params })
         .then(res => {
           this.$store.commit("updateUserItemStore", {