会员充值三版

This commit is contained in:
duan 2024-07-19 16:08:51 +08:00
parent 77c52b3625
commit 679f919106
3 changed files with 26 additions and 16 deletions

View File

@ -18,9 +18,7 @@
}, },
onUnload() { onUnload() {
if (this.switchdata) { if (this.switchdata) {
uni.switchTab({ uni.navigateBack()
url: '/pages/index/index'
});
} }
}, },
methods: { methods: {
@ -36,8 +34,18 @@
shopId: this.shopId shopId: this.shopId
}) })
if (res.code == 0) { if (res.code == 0) {
let resdata = await this.api.loginwxuserInfo({
userId: uni.cache.get('userInfo').id
})
if (resdata.code == 0) {
this.switchdata = false this.switchdata = false
uni.navigateBack() 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.paygetShopByMember(e.shopId)
} }
this.paygetActive(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: { methods: {
async paygetShopByMember(w) { async paygetShopByMember(w) {

View File

@ -379,9 +379,18 @@
}) })
}, },
goRecharge() { // goRecharge() { //
// ,,
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', { uni.pro.navigateTo('/pages/member/index', {
shopId: uni.cache.get('shopUser') shopId: uni.cache.get('shopUser')
}) })
}
}, },
orderdetail() { // orderdetail() { //
let data = { let data = {