Commit 76925acb authored by beisir's avatar beisir

Merge branch 'feat/group-buy' of git.quantgroup.cn:ui/group-buy-ui into feat/group-buy

parents 919693cf 389f976e
......@@ -215,7 +215,8 @@ export default {
this.groupId = +res.groupBuyInfo.groupId || '';
}
if (res.saleCount && res.activitySkuTotalCount) {
const percentage = +res.activitySkuTotalCount - +res.saleCount / +res.activitySkuTotalCount;
const percentage =
(+res.activitySkuTotalCount - +res.saleCount) / +res.activitySkuTotalCount;
if (isNaN(percentage)) {
this.stockPercentage = 0;
} else {
......
......@@ -81,8 +81,8 @@ 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 {
......@@ -137,7 +137,6 @@ export default {
}
});
} catch (err) {
alert(err);
alert(JSON.stringify(err));
}
}
......
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