fix: 调增 下跌xx元为显示下跌的正数 (#3402)

This commit is contained in:
LazzYang
2019-11-11 12:04:46 +08:00
committed by DIYgod
parent 62d245e877
commit e42dbaf88a
+1 -1
View File
@@ -26,7 +26,7 @@ module.exports = async (ctx) => {
const change = (today - yesterday).toFixed(2);
let description = `较昨日价格, 每公斤上涨${change}元`;
if (yesterday > today) {
description = `较昨日价格, 下跌${change}元`;
description = `较昨日价格, 下跌${-change}元`;
}
if (yesterday === today) {
description = '较昨日价格持平';