|
|
@@ -43,6 +43,7 @@ export default {
|
|
|
if(this.$util.isEmpty(token)){
|
|
|
//首页、花店采购页、欠款单列表页、结账单详情页
|
|
|
if(currentRoute == 'admin/home/workbench' || currentRoute == 'pagesPurchase/ghsProduct' || currentRoute == 'pagesPurchase/gathering' || currentRoute == 'admin/clear/info' || currentRoute == 'pagesPurchase/purDetails'){
|
|
|
+ uni.showLoading({mask:true})
|
|
|
wxLoginFn(true).then(res => {
|
|
|
let token = res.data.token || ''
|
|
|
//用于开启小程序自动登录
|
|
|
@@ -52,12 +53,14 @@ export default {
|
|
|
getShopInfo(true)
|
|
|
this.setUserShopAll()
|
|
|
}
|
|
|
+ uni.hideLoading()
|
|
|
if (this.init) {
|
|
|
this.init()
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
}else{
|
|
|
+ uni.showLoading({mask:true})
|
|
|
hasTokenAutoLogin().then(subRes=>{
|
|
|
//有几个地方涉及登陆,需要统一方法,请搜索关键词 uni_login
|
|
|
if(subRes.code == 1){
|
|
|
@@ -74,8 +77,8 @@ export default {
|
|
|
uni.setNavigationBarTitle({ title: res.name })
|
|
|
})
|
|
|
that.setUserShopAll()
|
|
|
+ uni.hideLoading()
|
|
|
}
|
|
|
-
|
|
|
})
|
|
|
}
|
|
|
// #endif
|