fix: 🐛 修复管理端下架商品传递undefined问题,优化秒杀展示

master
paulGao 2022-09-09 14:30:15 +08:00
parent 2792df38c0
commit 0933f1942e
3 changed files with 6 additions and 4 deletions

View File

@ -42,9 +42,10 @@
<div class="goods-show-detail">
<span>{{ item.goodsName }}</span>
</div>
<div class="goods-seckill-btn" :class="{'goods-seckill-btn-gray' : nowHour < list[currIndex].timeLine}">{{nowHour >= list[currIndex].timeLine ? '立即抢购' : '即将开始'}}</div>
<div v-if="item.quantity" class="goods-seckill-btn" :class="{'goods-seckill-btn-gray' : nowHour < list[currIndex].timeLine}">{{nowHour >= list[currIndex].timeLine ? '立即抢购' : '即将开始'}}</div>
<div v-else-if="!item.quantity || item.quantity <= item.salesNum" class="goods-seckill-btn goods-seckill-btn-gray">已售罄</div>
<div class="goods-show-num">
已售<Progress style="width:110px" class="ml_10" :percent="Math.ceil(item.salesNum/(item.quantity+item.salesNum)*100)" />
已售<Progress style="width:110px" class="ml_10" :percent="item.quantity ? Math.ceil(item.salesNum/(item.quantity+item.salesNum)*100) : 100" />
</div>
<div class="goods-show-seller">
<span>{{ item.storeName }}</span>

View File

@ -119,7 +119,6 @@ service.interceptors.response.use(
}
} else {
// 其他错误处理
console.log(error.response.data);
Message.error(error.response.data.message);
}
}

View File

@ -386,8 +386,10 @@ export default {
//
edit(v) {
this.id = v.id;
if (v.underMessage != "{}") {
if (v.underMessage) {
this.underForm.reason = v.underMessage;
} else {
this.underForm.reason = "";
}
this.modalVisible = true;
},