会员充值三版

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() {
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 = {