Authored by 郝肖肖

保留二位小数

@@ -19,7 +19,7 @@ const _handelUseYohoCoin = (info) => { @@ -19,7 +19,7 @@ const _handelUseYohoCoin = (info) => {
19 19
20 if (info) { 20 if (info) {
21 Object.assign(resData, { 21 Object.assign(resData, {
22 - yoho_coin: info.yoho_coin, 22 + yoho_coin: info.yoho_coin.toFixed(2),
23 use_yoho_coin: info.use_yoho_coin, 23 use_yoho_coin: info.use_yoho_coin,
24 total_yoho_coin_num: info.total_yoho_coin_num, 24 total_yoho_coin_num: info.total_yoho_coin_num,
25 yoho_coin_pay_rule: info.yoho_coin_pay_rule, 25 yoho_coin_pay_rule: info.yoho_coin_pay_rule,
@@ -145,13 +145,14 @@ const getEasypayOrderData = (params, uid) => { @@ -145,13 +145,14 @@ const getEasypayOrderData = (params, uid) => {
145 }); 145 });
146 }; 146 };
147 147
  148 +
148 const getOrderComputeData = (uid, cartType, params) => { 149 const getOrderComputeData = (uid, cartType, params) => {
149 params.productSkuList = _getLimitProductData(params); 150 params.productSkuList = _getLimitProductData(params);
150 151
151 return easypayApi.getEasypayComputeAsync(uid, cartType, params.paymentType, params.deliveryWay, params).then(result => { // eslint-disable-line 152 return easypayApi.getEasypayComputeAsync(uid, cartType, params.paymentType, params.deliveryWay, params).then(result => { // eslint-disable-line
152 if (result.code === 200) { 153 if (result.code === 200) {
153 - result.data.last_order_amount = _.round(result.data.last_order_amount, 2);  
154 - result.data = Object.assign(_handelUseYohoCoin(result.data), result.data); 154 + result.data.last_order_amount = (result.data.last_order_amount).toFixed(2);
  155 + result.data = Object.assign(result.data, _handelUseYohoCoin(result.data));
155 } 156 }
156 return result; 157 return result;
157 }); 158 });