fix: 调增 下跌xx元为显示下跌的正数 (#3402)
This commit is contained in:
parent
62d245e877
commit
e42dbaf88a
|
|
@ -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 = '较昨日价格持平';
|
||||
|
|
|
|||
Loading…
Reference in New Issue