|
@@ -119,18 +119,21 @@ export default {
|
|
|
if (e.detail.errMsg === "getPhoneNumber:ok") {
|
|
if (e.detail.errMsg === "getPhoneNumber:ok") {
|
|
|
wxMobileLogin({ iv: e.detail.iv, encryptedData: e.detail.encryptedData,miniOpenId:currentMiniOpenId }).then(subRes => {
|
|
wxMobileLogin({ iv: e.detail.iv, encryptedData: e.detail.encryptedData,miniOpenId:currentMiniOpenId }).then(subRes => {
|
|
|
uni.hideLoading()
|
|
uni.hideLoading()
|
|
|
- if(subRes.data && subRes.data.hasNoOpenId && subRes.data.hasNoOpenId ==1){
|
|
|
|
|
|
|
+ if(subRes.data && subRes.data.hasNoOpenId && subRes.data.hasNoOpenId == 1){
|
|
|
that.$util.confirmModal({content:'网络异常,请重试一次'},() => {
|
|
that.$util.confirmModal({content:'网络异常,请重试一次'},() => {
|
|
|
|
|
+
|
|
|
// #ifdef MP-WEIXIN
|
|
// #ifdef MP-WEIXIN
|
|
|
uni.clearStorage()
|
|
uni.clearStorage()
|
|
|
that.$store.commit("setLoginInfo", {})
|
|
that.$store.commit("setLoginInfo", {})
|
|
|
that.$util.pageTo({url: "/admin/home/workbench",type: 3})
|
|
that.$util.pageTo({url: "/admin/home/workbench",type: 3})
|
|
|
// #endif
|
|
// #endif
|
|
|
|
|
+
|
|
|
// #ifdef APP-PLUS
|
|
// #ifdef APP-PLUS
|
|
|
uni.clearStorage()
|
|
uni.clearStorage()
|
|
|
that.$store.commit("setLoginInfo", {})
|
|
that.$store.commit("setLoginInfo", {})
|
|
|
plus.runtime.restart()
|
|
plus.runtime.restart()
|
|
|
// #endif
|
|
// #endif
|
|
|
|
|
+
|
|
|
})
|
|
})
|
|
|
return false
|
|
return false
|
|
|
}
|
|
}
|
|
@@ -156,6 +159,7 @@ export default {
|
|
|
that.$store.commit('setLoginInfo', { ...subRes.data.admin, ...subRes.data })
|
|
that.$store.commit('setLoginInfo', { ...subRes.data.admin, ...subRes.data })
|
|
|
getShopInfo(true).then(res => { uni.setNavigationBarTitle({ title: res.name }) })
|
|
getShopInfo(true).then(res => { uni.setNavigationBarTitle({ title: res.name }) })
|
|
|
that.setUserShopAll()
|
|
that.setUserShopAll()
|
|
|
|
|
+
|
|
|
// #ifdef APP-PLUS
|
|
// #ifdef APP-PLUS
|
|
|
//保存安卓的clientId
|
|
//保存安卓的clientId
|
|
|
let hasClientId = !that.$util.isEmpty(subRes.data.admin.clientId) ? subRes.data.admin.clientId : ''
|
|
let hasClientId = !that.$util.isEmpty(subRes.data.admin.clientId) ? subRes.data.admin.clientId : ''
|
|
@@ -165,6 +169,11 @@ export default {
|
|
|
replaceClientId({id:currentClientId})
|
|
replaceClientId({id:currentClientId})
|
|
|
}
|
|
}
|
|
|
// #endif
|
|
// #endif
|
|
|
|
|
+ if(subRes.data.admin && that.$util.isEmpty(subRes.data.admin.miniOpenId)){
|
|
|
|
|
+ that.$util.pageTo({url: "/admin/staff/miniAutoLogin",type: 2})
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
uni.navigateBack()
|
|
uni.navigateBack()
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|