覆盖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

@@ -159,6 +159,18 @@
this.init()
}
// 会员总信息
const asyncshopUserInfo = async () => {
let res = await APIshopUserInfo({
shopId: shopUserInfo.shopId
})
uni.cache.set('orderVIP', res)
uni.cache.set('ordershopUserInfo', res.shopInfo)
form.memberOpen = res.isVip == 1 ? false : true
}
onMounted(async () => {
// 获取当前页面栈
const pages = getCurrentPages();
@@ -171,16 +183,17 @@
const currentPage = pages[pages.length - 1];
// 获取页面参数
const pageParams = currentPage.options;
let res = await APIusershopInfodetail({
shopId: pageParams.shopId
})
// 根据传的shopInfo来返回上面的值
shopUserInfo.shopInfo = await APIshopUserInfo({
shopId: pageParams.shopId
})
shopUserInfo.shopExtend = res.shopExtend.member_bg
shopUserInfo.shopId = pageParams.shopId
form.memberOpen = shopUserInfo.shopInfo.isVip == 1 ? false : true
if (pageParams.shopId) {
asyncshopUserInfo()
uni.cache.set('shopId', pageParams.shopId, 30)
let res = await APIusershopInfodetail({
shopId: pageParams.shopId
})
// 根据传的shopInfo来返回上面的值
shopUserInfo.shopExtend = res.shopExtend.member_bg
shopUserInfo.shopId = pageParams.shopId
}
})
</script>