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

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

View File

@ -144,12 +144,8 @@
<view class="-goods-flex"> <view class="-goods-flex">
<!-- 如果有积分显示积分 --> <!-- 如果有积分显示积分 -->
<view class="-goods-price" v-if="goodsDetail.price != undefined"> <view class="-goods-price" v-if="goodsDetail.price != undefined">
<span v-if="pointDetail.points">
<span class="price">{{ pointDetail.points }}</span> <span >
<span>积分</span>
</span>
<span v-else>
<span v-if="wholesaleList.length"> <span v-if="wholesaleList.length">
<span>¥</span><span class="price">{{ $options.filters.goodsFormatPrice(wholesaleList[wholesaleList.length-1].price)[0] }}</span>.{{ $options.filters.goodsFormatPrice(wholesaleList[wholesaleList.length-1].price)[1] }} <span>¥</span><span class="price">{{ $options.filters.goodsFormatPrice(wholesaleList[wholesaleList.length-1].price)[0] }}</span>.{{ $options.filters.goodsFormatPrice(wholesaleList[wholesaleList.length-1].price)[1] }}
~ ~
@ -668,10 +664,7 @@ export default {
if (item.indexOf("PINTUAN") == 0) { if (item.indexOf("PINTUAN") == 0) {
this.isGroup = true; this.isGroup = true;
} }
//
if (item.indexOf("POINTS_GOODS") == 0) {
this.pointDetail = this.PromotionList[item];
}
// //
if (item.indexOf("SECKILL") == 0) { if (item.indexOf("SECKILL") == 0) {
this.isSeckill = true this.isSeckill = true

View File

@ -42,6 +42,13 @@
<span class="pro-text">限时抢购</span> <span class="pro-text">限时抢购</span>
</div> </div>
</view> </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> </view>
<view v-if="!res"></view> <view v-if="!res"></view>
@ -77,7 +84,20 @@ export default {
}, },
}, },
mounted() {}, 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> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -108,4 +128,7 @@ export default {
.price_image { .price_image {
display: block; display: block;
} }
.href{
color: $main-color;
}
</style> </style>

View File

@ -32,6 +32,18 @@
<div class="text proText">{{ res[item].promotionName }}</div> <div class="text proText">{{ res[item].promotionName }}</div>
</div> </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 <div
class="promotion_col" class="promotion_col"
v-if=" v-if="

View File

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

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="page"> <div class="page">
<u-navbar :border-bottom="false" title=""></u-navbar> <u-navbar :border-bottom="false" title="积分商品"></u-navbar>
<div class="wrapper"> <div class="wrapper">
<!-- 积分商品列表 --> <!-- 积分商品列表 -->