fix:修复商品样式布置灰色

This commit is contained in:
wangsongsole 2022-10-20 17:47:23 +08:00
parent 9712bbf7d5
commit 867c38a49e
1 changed files with 27 additions and 24 deletions

View File

@ -100,31 +100,30 @@
alt="">
</span>
</div>
<div class="imgbox">
<div class="imgbox" :class="dynamicAsh(item)">
<!-- type :1 兑换码 2:立减金,channel:1支付宝2微信 -->
<img class="le-img"
:style="{width:(item.entity.product_name||item.entity.batch_goods_name).length>6?'0.4rem':'0.46rem'}"
:src="item.type==1?item.entity.show_url:(item.entity.channel==1?'https://lsxdemall.oss-cn-beijing.aliyuncs.com/commonproductlogo/zfbreduce.png':'https://lsxdemall.oss-cn-beijing.aliyuncs.com/commonproductlogo/wxreduce.png')"
:class="item.stock&&(item.stock<0||item.available!=1)&&(item.available!=2?'changegray':'')"></img>
:src="item.type==1?item.entity.show_url:(item.entity.channel==1?'https://lsxdemall.oss-cn-beijing.aliyuncs.com/commonproductlogo/zfbreduce.png':'https://lsxdemall.oss-cn-beijing.aliyuncs.com/commonproductlogo/wxreduce.png')"></img>
</div>
<div class="item-name"
<div class="item-name" :class="dynamicAsh(item)"
:style="{fontSize:(item.entity.product_name||item.entity.batch_goods_name).length>6?'0.08rem':'0.12rem'}"
v-html="item.type==1?item.entity.product_name:item.entity.batch_goods_name"
:class="item.stock&&(item.stock<0||item.available!=1)&&(item.available!=2?'changegray':'')">
v-html="item.type==1?item.entity.product_name:item.entity.batch_goods_name">
</div>
<template v-if="item.origin_price!==item.coupon_price">
<p class="price">
<p class="price" :class="dynamicAsh(item)">
原价¥{{item.origin_price}}
</p>
<p class="money">
<span class="coupon">券后价</span>
<span class="sign"></span>
<span class="current-price">{{item.coupon_price}}</span>
<span class="coupon" :class="dynamicAsh(item)">券后价</span>
<span class="sign" :class="dynamicAsh(item)"></span>
<span class="current-price"
:class="dynamicAsh(item)">{{item.coupon_price}}</span>
</p>
</template>
<p class="money moneyExtra" v-else>
<span class="sign"></span>
<span class="current-price">{{item.origin_price}}</span>
<span class="sign" :class="dynamicAsh(item)"></span>
<span class="current-price" :class="dynamicAsh(item)">{{item.origin_price}}</span>
</p>
</div>
</div>
@ -151,16 +150,16 @@
{{item.type==1?item.entity.product_name:item.entity.batch_goods_name}}</font>
<div class="details">
<template v-if="item.origin_price!==item.coupon_price">
<p class="sign"></p>
<p class="price">{{item.coupon_price}}</p>
<p class="coupon">券后价</p>
<p class="original-price">
<p class="sign" :class="dynamicAsh(item)"></p>
<p class="price" :class="dynamicAsh(item)">{{item.coupon_price}}</p>
<p class="coupon" :class="dynamicAsh(item)">券后价</p>
<p class="original-price" :class="dynamicAsh(item)">
原价¥{{item.origin_price}}
</p>
</template>
<p v-else style="margin-top:0.05rem">
<span class="sign"></span>
<span class="price">{{item.origin_price}}</span>
<span class="sign" :class="dynamicAsh(item)"></span>
<span class="price" :class="dynamicAsh(item)">{{item.origin_price}}</span>
</p>
</div>
</div>
@ -199,16 +198,16 @@
<div class="detail-text">
<font>{{item.type==1?item.entity.product_name:item.entity.batch_goods_name}}</font>
<template v-if="item.origin_price!==item.coupon_price">
<p class="original-price">原价¥{{item.origin_price}}</p>
<p class="original-price" :class="dynamicAsh(item)">原价¥{{item.origin_price}}</p>
<p>
<span class="sign"></span>
<span class="price">{{item.coupon_price}}</span>
<span class="coupon">券后价</span>
<span class="sign" :class="dynamicAsh(item)"></span>
<span class="price" :class="dynamicAsh(item)">{{item.coupon_price}}</span>
<span class="coupon" :class="dynamicAsh(item)">券后价</span>
</p>
</template>
<p v-else style="margin-top:0.05rem">
<span class="sign"></span>
<span class="price">{{item.origin_price}}</span>
<span class="sign" :class="dynamicAsh(item)"></span>
<span class="price" :class="dynamicAsh(item)">{{item.origin_price}}</span>
</p>
</div>
</li>
@ -504,6 +503,10 @@
});
}
},
/* 动态置灰 */
dynamicAsh (item) {
return (item.stock && (item.stock < 0 || item.available != 1) && item.available != 2) ? 'changegray' : ''
},
//选择商品点击兑换
exchangeBtn (row = this.exchangeCommity) {