|
@@ -128,6 +128,17 @@ export default {
|
|
|
this.UserService.userInfoLogin({code:wechatCode}).then(response=>{
|
|
|
this.login(response.data);
|
|
|
this.$store.commit('updateStatus',response.data)
|
|
|
+ this.getUserInfoPersonal(response.data.organizeId)
|
|
|
+ }).catch(error =>{
|
|
|
+ uni.setStorage({//缓存游客用户openid
|
|
|
+ key: 'openid',
|
|
|
+ data: error.data.openid
|
|
|
+ })
|
|
|
+ this.logout()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getUserInfoPersonal(organizeId){//初始化个人中心数据
|
|
|
+ this.UserService.userInfoPersonal({organizeId:organizeId}).then(response=>{
|
|
|
this.organizeName = response.data.organizeName
|
|
|
this.paymentCount = this.showBadge(response.data.paymentCount) //待付款
|
|
|
this.waitShipmentsCount = this.showBadge(response.data.waitShipmentsCount) //待收货
|
|
@@ -135,11 +146,7 @@ export default {
|
|
|
this.salesReturnCount = this.showBadge(response.data.salesReturnCount) //退货/款
|
|
|
this.isRequest = true
|
|
|
}).catch(error =>{
|
|
|
- uni.setStorage({//缓存游客用户openid
|
|
|
- key: 'openid',
|
|
|
- data: error.data.openid
|
|
|
- })
|
|
|
- this.logout()
|
|
|
+ this.$util.msg(error.msg, 2000)
|
|
|
})
|
|
|
},
|
|
|
// 客服
|