Merge pull request 'zhy' (#261) from zhy into master

Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/261
This commit is contained in:
hansu 2020-08-20 11:43:19 +08:00
commit bfffb44fe2

View File

@ -309,7 +309,7 @@ export default {
},
setTotalPrice() {
const goods = this.orderInfo.store_goods_total;
let freight = 0, price = 0, minPrice;
let [freight, price, minPrice] = [0, 0, 0];
//
for (const key in this.freight) {
if (this.freight.hasOwnProperty(key)) {
@ -346,7 +346,9 @@ export default {
if(JSON.stringify(this.choiceCoupon) != '{}') price -= Number(this.choiceCoupon.voucher_price);
// 0.01
if(price <= minPrice) price = minPrice;
// console.log(price);
// console.log("minPrice" + minPrice);
// console.log("freight:" + freight);
// console.log("price:" + price);
this.totalPrice = (price + freight).toFixed(2);
},
setDelivery(index) {