优惠卷和商品卷
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
<view class="card_bom_item" @click="itemClick(1)">
|
||||
<text>{{shopUserInfo.shopInfo.amount || '0.00'}}</text><text>储值</text>
|
||||
</view>
|
||||
<view class="card_bom_item">
|
||||
<view class="card_bom_item" @click="itemClick(2)">
|
||||
<text>{{shopUserInfo.shopInfo.accountPoints || '0'}}</text><text>积分</text>
|
||||
</view>
|
||||
<view class="card_bom_item" @click="itemClick(3)">
|
||||
@@ -88,7 +88,7 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<registermember :show="shopUserInfo.shopInfo.isVip == 1? false : true" :shopUserInfo="shopUserInfo.shopInfo">
|
||||
<registermember :memberOpen="form.memberOpen" :shopUserInfo="shopUserInfo.shopInfo">
|
||||
</registermember>
|
||||
|
||||
</view>
|
||||
@@ -129,19 +129,27 @@
|
||||
if (type == 1) {
|
||||
uni.pro.navigateTo('user/member/index', {
|
||||
shopId: shopUserInfo.shopId,
|
||||
type: 'index',
|
||||
type: type
|
||||
})
|
||||
} else if (type == 2) {
|
||||
uni.pro.navigateTo('user/member/billDetails', {
|
||||
shopId: shopUserInfo.shopId,
|
||||
type: type,
|
||||
shopInfo: JSON.stringify(shopUserInfo.shopInfo)
|
||||
})
|
||||
} else if (type == 3) {
|
||||
uni.pro.navigateTo('user/coupon', {
|
||||
shopId: shopUserInfo.shopId,
|
||||
shopInfo: shopUserInfo.shopInfo
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// * 注册会员卡
|
||||
const clickEvent = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/pay_code/pay_code?shopInfo=' + JSON.stringify(this.shopUserInfo)
|
||||
uni.pro.navigateTo('user/member/paycode', {
|
||||
shopId: shopUserInfo.shopId,
|
||||
shopInfo: JSON.stringify(shopUserInfo.shopInfo)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -152,34 +160,27 @@
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
try {
|
||||
// 获取当前页面栈
|
||||
const pages = getCurrentPages();
|
||||
// 检查页面栈是否为空
|
||||
if (pages.length === 0) {
|
||||
console.error('未获取到页面栈');
|
||||
return;
|
||||
}
|
||||
// 获取当前页面实例
|
||||
const currentPage = pages[pages.length - 1];
|
||||
// 获取页面参数
|
||||
const pageParams = currentPage.options;
|
||||
console.log(pageParams, 169)
|
||||
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
|
||||
} catch (error) {
|
||||
console.error('获取页面参数时出错:', error);
|
||||
// 获取当前页面栈
|
||||
const pages = getCurrentPages();
|
||||
// 检查页面栈是否为空
|
||||
if (pages.length === 0) {
|
||||
console.error('未获取到页面栈');
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 获取当前页面实例
|
||||
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
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user