This commit is contained in:
魏啾
2024-07-19 16:13:34 +08:00
3 changed files with 26 additions and 16 deletions

View File

@@ -18,9 +18,7 @@
},
onUnload() {
if (this.switchdata) {
uni.switchTab({
url: '/pages/index/index'
});
uni.navigateBack()
}
},
methods: {
@@ -36,8 +34,18 @@
shopId: this.shopId
})
if (res.code == 0) {
this.switchdata = false
uni.navigateBack()
let resdata = await this.api.loginwxuserInfo({
userId: uni.cache.get('userInfo').id
})
if (resdata.code == 0) {
this.switchdata = false
uni.cache.set('userInfo', resdata.data);
uni.pro.redirectTo('/pages/member/index', {
shopId: uni.cache.get('shopUser')
})
}
}
}
})

View File

@@ -42,14 +42,7 @@
this.paygetShopByMember(e.shopId)
}
this.paygetActive(e.shopId) //列表
// 判断是否绑定手机,只有下单时候有,会员列表肯定有
console.log(uni.cache.get('userInfo').telephone, '调试1')
if (uni.cache.get('userInfo').telephone=='') {
// 跳转到开通页面
uni.navigateTo({
url: '/pages/member/activatedmemberone?shopId=' + e.shopId
})
}
},
methods: {
async paygetShopByMember(w) {

View File

@@ -379,9 +379,18 @@
})
},
goRecharge() { // 去充值
uni.pro.navigateTo('/pages/member/index', {
shopId: uni.cache.get('shopUser')
})
// 判断是否绑定手机,只有下单时候有,会员列表肯定有
console.log(uni.cache.get('userInfo').telephone, '调试1')
if (uni.cache.get('userInfo').telephone == '') {
// 跳转到开通页面
uni.navigateTo({
url: '/pages/member/activatedmemberone?shopId=' + uni.cache.get('shopUser')
})
} else {
uni.pro.navigateTo('/pages/member/index', {
shopId: uni.cache.get('shopUser')
})
}
},
orderdetail() { // 直接生成订单
let data = {