feat: 💄 商品详情中积分商品展示优化 ,商品详情中将不再展示积分商品信息。

This commit is contained in:
学习很差啦
2022-11-09 17:00:57 +08:00
parent 0feaf55381
commit 0aa9831a62
5 changed files with 41 additions and 13 deletions

View File

@@ -42,6 +42,13 @@
<span class="pro-text">限时抢购</span>
</div>
</view>
<view v-if="prom.split('-')[0] == 'POINTS_GOODS'">
<div class="res_prom_item">
<u-tag text="积分活动" type="error"></u-tag>
<span class="pro-text">当前商品参与积分活动<span @click="handClickToJoinPromotion(prom,prom.split('-')[0])" class="href">点击此处参与活动</span></span>
</div>
</view>
</view>
</view>
<view v-if="!res">暂无促销活动</view>
@@ -77,7 +84,20 @@ export default {
},
},
mounted() {},
methods: {},
methods: {
// 跳转到参与商品活动的详情列表中
handClickToJoinPromotion(val,type){
const promotion = {
"POINTS_GOODS": `/pages/promotion/point/detail?id=${this.res[val].id}`
}
uni.navigateTo({
url:promotion[type]
})
}
},
};
</script>
<style lang="scss" scoped>
@@ -108,4 +128,7 @@ export default {
.price_image {
display: block;
}
.href{
color: $main-color;
}
</style>

View File

@@ -32,6 +32,18 @@
<div class="text proText">{{ res[item].promotionName }}</div>
</div>
</div>
<div
class="promotion_col"
v-if="
item.split('-')[0] == promotionItem.value && item.split('-')[0] == 'POINTS_GOODS'
"
>
<!-- 积分活动 -->
<div class="flex">
<view class="deg_tag">{{ promotionItem.title }}</view>
<div class="text proText">{{ res[item].promotionName }}</div>
</div>
</div>
<div
class="promotion_col"
v-if="

View File

@@ -1,7 +1,7 @@
const promotion = [
{
title: "积分活动",
value: "POINT",
value: "POINTS_GOODS",
},
{
title: "单品立减",