覆盖11.20的代码

This commit is contained in:
wwz
2025-03-12 13:43:14 +08:00
parent cab9f836af
commit 50c5b4ca81
7 changed files with 197 additions and 118 deletions

View File

@@ -94,7 +94,7 @@
</view>
<view class="recharge" @tap="$u.debounce(userbalancerechangesub, 500)">立即充值</view>
</view>
<registermember :memberOpen="infoForn.show" :shopUserInfo="infoForn.shopUserInfo">
<registermember :memberOpen="infoForn.show" :shopUserInfo="infoForn.shopUserInfo" :detailtype='detailtype' >
</registermember>
</view>
@@ -159,6 +159,7 @@
infoForn.listdata = res;
infoForn.couponList = infoForn.listdata[0].couponList;
infoForn.giftAmount = infoForn.listdata[0].giftAmount
infoForn.id = infoForn.listdata[0].id
if (infoForn.type == 'topUpActivity') {
infoForn.amountChange()
} else {
@@ -288,11 +289,11 @@
// 充值金额切换
const clickinput = (a, b) => {
console.log(a, b)
infoForn.inputshow = b;
infoForn.couponList = a.couponList;
infoForn.amount = a.amount;
infoForn.giftAmount = a.giftAmount;
infoForn.id = a.id;
}
// 充值
@@ -319,8 +320,17 @@
});
return false;
}
console.log({
shopId: infoForn.shopId,
activateId: infoForn.id,
shopUserId: infoForn.userInfo.id,
amount: infoForn.amount, //金额
returnUrl: '', //跳转地址
buyerRemark: ''
})
let res = await store.actionspayltPayVip({
shopId: infoForn.shopId,
activateId: infoForn.id,
shopUserId: infoForn.userInfo.id,
amount: infoForn.amount, //金额
returnUrl: '', //跳转地址
@@ -329,6 +339,19 @@
console.log(res)
}
// 会员总信息
const asyncshopUserInfo = async () => {
let res = await APIshopUserInfo({
shopId: uni.cache.get('shopId')
})
uni.cache.set('orderVIP', res)
uni.cache.set('ordershopUserInfo', res.shopInfo)
infoForn.show = res.isVip == 1 ? false : true
}
const detailtype = ref('')
onMounted(async () => {
// 获取当前页面栈
const pages = getCurrentPages();
@@ -349,21 +372,17 @@
// }
// uni.cache.set('shopId', infoForn.shopId)
// // #endif
if (options.shopId) {
uni.cache.set('shopId', options.shopId, 30)
infoForn.shopId = options.shopId ? options.shopId : uni.cache.get('shopId')
let resone = await APIusershopInfodetail({
shopId: options.shopId
})
infoForn.shopUserInfo = resone.shopInfo
// 根据传的shopInfo来返回上面的值
infoForn.userInfo = await APIshopUserInfo({
shopId: options.shopId
})
infoForn.show == infoForn.userInfo.isVip == 1 ? true : false
asyncshopUserInfo()
}
if (options.type == 'detail') {
detailtype.value = 'detail'
}
if (options.type) {
infoForn.type = options.type