feat: “会员优选”商品卡片点击不再跳转到商品详情页

This commit is contained in:
2026-06-05 16:37:01 +08:00
parent e271764292
commit 70cbccbb52
2 changed files with 12 additions and 3 deletions
+10 -2
View File
@@ -9,7 +9,7 @@
>
<view
class="shrink"
@click="utils.go('/pages/goods/info', { id: props.data.id })"
@click="onCardClick"
:class="{
goodsImg1: props.type == 1,
goodsImg2: props.type == 2,
@@ -22,7 +22,7 @@
mode="aspectFill"
/>
</view>
<view class="goodItem" :class="{itemBg: props.type == 1}" @click="utils.go('/pages/goods/info', { id: props.data.id })">
<view class="goodItem" :class="{ itemBg: props.type == 1 }" @click="onCardClick">
<view class="wrap">
<view
class="title "
@@ -124,6 +124,14 @@
},
);
let showSelectSku = ref(false);
const goDetail = () => {
sheep.$router.go('/pages/goods/info', { id: props.data.id });
};
const onCardClick = () => {
if (props.memberPreferred) return;
goDetail();
};
const buyMemberGoods = () => {
uni.navigateTo({
url: `/pages/AI/giftOrder?id=${props.data.id}`,