Commit a452bd6a by 侯体倬

价格展示处理

parent 408b5600
...@@ -45,12 +45,12 @@ const componentOptions = { ...@@ -45,12 +45,12 @@ const componentOptions = {
this.getSecKillInfo(val); this.getSecKillInfo(val);
} }
} }
if (this.data.datas.componentData['columnNum'] == 3) { // 判断当前商品行数是否为 3,如果为 3 进行格式化
this.setData({ const columnNumFlag = this.data.datas.componentData['columnNum'] == 3;
minPrice: this.keepSelfNum(val.minPrice || 0), this.setData({
minGoodsSuggestedRetailPrice: this.keepSelfNum(val.minGoodsSuggestedRetailPrice || 0) minPrice: columnNumFlag ? this.keepSelfNum(val.minPrice || 0) : val.minPrice,
}) minGoodsSuggestedRetailPrice: columnNumFlag ? this.keepSelfNum(val.minGoodsSuggestedRetailPrice || 0) : val.minGoodsSuggestedRetailPrice
} })
} }
}, },
// 组件方法 // 组件方法
......
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