Commit 02267fd5 by hxx

砍价标识处理

parent 9a4852b3
......@@ -29,11 +29,15 @@ const componentOptions = {
isBeginSecKill: false, // 是否开始秒杀
isLessTenHour: false, // 秒杀活动小于 10 小时
currentSecKillInfo: {}, // 当前秒杀信息
priceTextStyle: 'flex-start'
priceTextStyle: 'flex-start',
cutPrice: "", // 砍价价格
},
// 数据监听器
observers: {
items(val) {
if (val && val.cutActivityGoodsList && val.cutActivityGoodsList.length != 0) {
this.setData({ cutPrice: Number(val.cutActivityGoodsList[0].minPrice).toFixed(2) })
}
if (val && val.secondKillActivityInfoGoodsList && !this.data.currentSecKillInfo.id) {
if (val.secondKillActivityInfoGoodsList.length > 0) {
this.getSecKillInfo(val);
......
......@@ -159,8 +159,16 @@
<view class="bottom" wx:if="{{datas.componentData['goodsType'] !=1}}">
<!-- 价格 -->
<view class="priceItem flex" style="flex-wrap:{{items && items.secondKillActivityInfoGoodsList ? 'wrap' : 'nowrap'}};justify-content:{{priceTextStyle}}">
<!-- 砍价展示 -->
<block wx:if="{{items && items.cutActivityGoodsList && items.cutActivityGoodsList.length != 0}}">
<view class="flex cut-price__wrapper">
<view class="cut-price__min" style="color:{{datas.componentData['priceColor']}};font-size:{{datas.componentData['priceFontSize']}}em;">¥{{ cutPrice }}</view>
<text style="font-size:24rpx;color:#999;text-decoration:line-through;margin-left:12rpx;">¥{{items.minPrice}}</text>
<view class="cut-price__tag">砍价享</view>
</view>
</block>
<!-- 秒杀展示 -->
<block wx:if="{{items && items.secondKillActivityInfoGoodsList}}">
<block wx:elif="{{items && items.secondKillActivityInfoGoodsList}}">
<view class="flex" style="margin: 12rpx 0 6rpx;align-items: center;width: 100%;">
<view style="color:{{datas.componentData['priceColor']}};font-size:{{datas.componentData['priceFontSize']}}em;">
¥{{ currentSecKillInfo.spikePrice }}
......
......@@ -424,4 +424,24 @@ margin-right: 8rpx;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
}
.cut-price__wrapper {
margin: 12rpx 0 6rpx;
display: flex;
align-items: flex-end;
flex-wrap: wrap;
}
.cut-price__wrapper .cut-price__min {
font-weight: 600;
}
.cut-price__wrapper .cut-price__tag {
font-size: 24rpx;
padding: 2rpx 8rpx;
margin-left: 12rpx;
border: 2rpx solid;
border-radius: 8rpx;
color: #C72A30;
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment