Authored by 郝肖肖

保留二位小数

... ... @@ -19,7 +19,7 @@ const _handelUseYohoCoin = (info) => {
if (info) {
Object.assign(resData, {
yoho_coin: info.yoho_coin,
yoho_coin: info.yoho_coin.toFixed(2),
use_yoho_coin: info.use_yoho_coin,
total_yoho_coin_num: info.total_yoho_coin_num,
yoho_coin_pay_rule: info.yoho_coin_pay_rule,
... ... @@ -145,13 +145,14 @@ const getEasypayOrderData = (params, uid) => {
});
};
const getOrderComputeData = (uid, cartType, params) => {
params.productSkuList = _getLimitProductData(params);
return easypayApi.getEasypayComputeAsync(uid, cartType, params.paymentType, params.deliveryWay, params).then(result => { // eslint-disable-line
if (result.code === 200) {
result.data.last_order_amount = _.round(result.data.last_order_amount, 2);
result.data = Object.assign(_handelUseYohoCoin(result.data), result.data);
result.data.last_order_amount = (result.data.last_order_amount).toFixed(2);
result.data = Object.assign(result.data, _handelUseYohoCoin(result.data));
}
return result;
});
... ...