Authored by 郭成尧

transPrice

... ... @@ -13,10 +13,18 @@ const shoppingAPI = require('../../serverAPI/order/shopping');
* @return float|string 转换之后的价格
*/
const transPrice = (price, isSepcialZero) => {
if (!price) {
price = 0;
}
if (!isSepcialZero) {
isSepcialZero = false;
}
if (price || isSepcialZero) {
price = price.toFixed(2);
}
return price;
};
... ...