会员展示问题修复,本地开发工具增加环境切换判断
This commit is contained in:
@@ -118,6 +118,10 @@
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
shopId: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
});
|
||||
|
||||
// 定义事件发射器
|
||||
@@ -145,11 +149,11 @@
|
||||
|
||||
const init = async () => {
|
||||
|
||||
// if (uni.cache.get('shopUserInfo') && uni.cache.get('shopId') == uni.cache.get('shopUserInfo').id) {
|
||||
// if (uni.cache.get('shopUserInfo') && props.shopId||uni.cache.get('shopId') == uni.cache.get('shopUserInfo').id) {
|
||||
// shopUserInfo = uni.cache.get('shopUserInfo');
|
||||
// } else {
|
||||
// let res = await this.api.shopUserInfo({
|
||||
// "shopId": uni.cache.get('shopId'),
|
||||
// "shopId": props.shopId||uni.cache.get('shopId'),
|
||||
// "userId": uni.cache.get('userInfo').id,
|
||||
// })
|
||||
// if (res.code == 0) {
|
||||
@@ -192,7 +196,7 @@
|
||||
url: uni.conf.baseUrl + '/account/user/common/upload',
|
||||
filePath: avatarUrl,
|
||||
header: {
|
||||
shopId: uni.cache.get('shopId'),
|
||||
shopId: props.shopId||uni.cache.get('shopId'),
|
||||
token: uni.cache.get('token') || '',
|
||||
'content-type': 'multipart/form-data'
|
||||
},
|
||||
@@ -339,7 +343,7 @@
|
||||
}
|
||||
const submitForm={
|
||||
// id: uni.cache.get('userInfo').id,
|
||||
// shopId: uni.cache.get('shopId'),
|
||||
shopId: props.shopId||uni.cache.get('shopId'),
|
||||
nickName: formInfo.nickName,
|
||||
headImg: userHeadImg.value,
|
||||
phone: formInfo.telephone,
|
||||
@@ -348,7 +352,7 @@
|
||||
}
|
||||
await APIshopUser(submitForm)
|
||||
let APIshopUserInfores = await APIshopUserInfo({
|
||||
shopId: uni.cache.get('shopId')
|
||||
shopId: props.shopId||uni.cache.get('shopId')
|
||||
})
|
||||
uni.cache.set('orderVIP', APIshopUserInfores)
|
||||
uni.cache.set('ordershopUserInfo', APIshopUserInfores.shopInfo)
|
||||
|
||||
Reference in New Issue
Block a user