Commit d910a240 authored by Xuguangxing's avatar Xuguangxing

fix: 进度条修改

parent 5003a0f2
......@@ -215,7 +215,7 @@ export default {
this.groupId = +res.groupBuyInfo.groupId || '';
}
if (res.saleCount && res.activitySkuTotalCount) {
const percentage = +res.activitySkuTotalCount - +res.saleCount / +res.activitySkuTotalCount;
const percentage = +res.goodsCount / +res.activitySkuTotalCount;
if (isNaN(percentage)) {
this.stockPercentage = 0;
} else {
......
......@@ -81,11 +81,12 @@ export default {
if (!item) return 0;
let percentage = 0;
// saleCount / activitySkuTotalCount
const { saleCount, activitySkuTotalCount } = item;
percentage = +activitySkuTotalCount - +saleCount / +activitySkuTotalCount;
const { goodsCount, activitySkuTotalCount } = item;
percentage = +goodsCount / +activitySkuTotalCount;
if (isNaN(percentage)) {
return 0;
} else {
alert(Math.floor(percentage) >= 1 ? 100 : Math.floor(percentage * 100));
return Math.floor(percentage) >= 1 ? 100 : Math.floor(percentage * 100);
}
},
......
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