shish %!s(int64=3) %!d(string=hai) anos
pai
achega
93406acc4f
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  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')
       let token = uni.getStorageSync('token')
       if(this.$util.isEmpty(token)){
       if(this.$util.isEmpty(token)){
         if(currentRoute == 'admin/home/workbench'){
         if(currentRoute == 'admin/home/workbench'){
+          uni.showLoading({mask:true})
           wxMiniLogin(true).then(res => {
           wxMiniLogin(true).then(res => {
 						//用于开启小程序自动登录
 						//用于开启小程序自动登录
 						let currentMiniOpenId = res.data.currentMiniOpenId || ''
 						let currentMiniOpenId = res.data.currentMiniOpenId || ''
@@ -63,6 +64,7 @@ export default {
               getShopInfo(true)
               getShopInfo(true)
               this.setUserShopAll()
               this.setUserShopAll()
             }
             }
+            uni.hideLoading()
             if (this.init) {
             if (this.init) {
               this.init()
               this.init()
             }
             }
@@ -70,6 +72,7 @@ export default {
         }
         }
       }else{
       }else{
         let that = this
         let that = this
+        uni.showLoading({mask:true})
         hasTokenAutoLogin().then(subRes=>{
         hasTokenAutoLogin().then(subRes=>{
           if(subRes.code != 1){
           if(subRes.code != 1){
             return
             return
@@ -82,7 +85,7 @@ export default {
 					})
 					})
           store.commit('setLoginInfo', { ...subRes.data.admin, ...subRes.data })
           store.commit('setLoginInfo', { ...subRes.data.admin, ...subRes.data })
           this.skCustomId = subRes.data.skCustomId
           this.skCustomId = subRes.data.skCustomId
-
+          uni.hideLoading()
           this.setUserShopAll()
           this.setUserShopAll()
           if (this.init) {
           if (this.init) {
             this.init()
             this.init()