|
@@ -54,7 +54,6 @@ 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 || ''
|
|
@@ -64,7 +63,6 @@ export default {
|
|
|
getShopInfo(true)
|
|
getShopInfo(true)
|
|
|
this.setUserShopAll()
|
|
this.setUserShopAll()
|
|
|
}
|
|
}
|
|
|
- uni.hideLoading()
|
|
|
|
|
if (this.init) {
|
|
if (this.init) {
|
|
|
this.init()
|
|
this.init()
|
|
|
}
|
|
}
|
|
@@ -72,7 +70,6 @@ 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
|
|
@@ -85,7 +82,6 @@ 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()
|