shish há 3 anos atrás
pai
commit
93406acc4f
1 ficheiros alterados com 4 adições e 1 exclusões
  1. 4 1
      ghsApp/src/mixins/globalMixins.js

+ 4 - 1
ghsApp/src/mixins/globalMixins.js

@@ -54,6 +54,7 @@ export default {
       let token = uni.getStorageSync('token')
       if(this.$util.isEmpty(token)){
         if(currentRoute == 'admin/home/workbench'){
+          uni.showLoading({mask:true})
           wxMiniLogin(true).then(res => {
 						//用于开启小程序自动登录
 						let currentMiniOpenId = res.data.currentMiniOpenId || ''
@@ -63,6 +64,7 @@ export default {
               getShopInfo(true)
               this.setUserShopAll()
             }
+            uni.hideLoading()
             if (this.init) {
               this.init()
             }
@@ -70,6 +72,7 @@ export default {
         }
       }else{
         let that = this
+        uni.showLoading({mask:true})
         hasTokenAutoLogin().then(subRes=>{
           if(subRes.code != 1){
             return
@@ -82,7 +85,7 @@ export default {
 					})
           store.commit('setLoginInfo', { ...subRes.data.admin, ...subRes.data })
           this.skCustomId = subRes.data.skCustomId
-
+          uni.hideLoading()
           this.setUserShopAll()
           if (this.init) {
             this.init()