|
|
@@ -250,44 +250,10 @@ export default {
|
|
|
uni.showLoading({mask:true})
|
|
|
applyLjh({hdShopAdminId:this.option.hdShopAdminId,ghsShopAdminId:this.option.ghsShopAdminId,...this.form,style:style,from:from,miniOpenId:currentMiniOpenId}).then(subRes => {
|
|
|
uni.hideLoading()
|
|
|
- let token = subRes.data.token || ''
|
|
|
- uni.hideLoading()
|
|
|
- if (that.$util.isEmpty(token)) {
|
|
|
- that.$msg('出错了')
|
|
|
- return false
|
|
|
- }
|
|
|
- //有几个地方涉及登陆,需要统一方法,请搜索关键词 uni_login
|
|
|
if(subRes.code == 1){
|
|
|
- if (that.$util.isEmpty(subRes)) {
|
|
|
- that.$msg('出错了')
|
|
|
- return false
|
|
|
- }
|
|
|
- uni.setStorageSync('token', subRes.data.token)
|
|
|
- uni.setStorageSync('shopId', subRes.data.admin.currentShopId)
|
|
|
- getDictionaries({ token: subRes.data.token }).then(res => {
|
|
|
- if (that.$util.isEmpty(res)) {
|
|
|
- return false
|
|
|
- }
|
|
|
- that.$store.commit('setDictionariesInfo', { ...res.data.dict, ...res.data })
|
|
|
- that.$store.commit('setMyShopInfo', { ...res.data.shop, ...res.data })
|
|
|
- })
|
|
|
- that.$store.commit('setLoginInfo', { ...subRes.data.admin, ...subRes.data })
|
|
|
- getShopInfo(true).then(res => {
|
|
|
- uni.setNavigationBarTitle({ title: res.name })
|
|
|
- })
|
|
|
- that.setUserShopAll()
|
|
|
- // #ifdef APP-PLUS
|
|
|
- //保存安卓的clientId
|
|
|
- let hasClientId = !that.$util.isEmpty(subRes.data.admin.clientId) ? subRes.data.admin.clientId : ''
|
|
|
- const clientInfo = plus.push.getClientInfo()
|
|
|
- let currentClientId = !that.$util.isEmpty(clientInfo.clientid) ? clientInfo.clientid : ''
|
|
|
- if(hasClientId == '' || hasClientId != currentClientId){
|
|
|
- replaceClientId({id:currentClientId})
|
|
|
- }
|
|
|
- // #endif
|
|
|
+ that.$util.pageTo({url: "/admin/ljh/confirmPay?id="+subRes.data.id})
|
|
|
}
|
|
|
- this.$util.pageTo({url: "/admin/ljh/applyResult", type:2})
|
|
|
- });
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
};
|