|
|
@@ -111,7 +111,7 @@ |
|
|
|
<!-- <text style="color:red" @click="deliveryTemplate">(查看详情)</text> --> |
|
|
|
</view> |
|
|
|
<view class="cell-tip"> |
|
|
|
Thanh toán khi nhận hàng |
|
|
|
Đơn 299k Freeship toàn quốc |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="yt-list-cell b-b"> |
|
|
@@ -579,23 +579,26 @@ |
|
|
|
let delivery = this.deliveryList[this.deliveryIndex]; |
|
|
|
if (delivery) { |
|
|
|
let deliveryPrice = 0; |
|
|
|
if (delivery.hasOwnProperty('id')) { |
|
|
|
if (delivery.min > number) { |
|
|
|
this.$api.msg('必须至少购买' + delivery.min + '件商品才能使用此配送方式', 6000) |
|
|
|
} |
|
|
|
// 如何为0就赋值1,不然下面的循环会死循环 |
|
|
|
delivery.first = delivery.first == 0 ? 1 : delivery.first; |
|
|
|
delivery.additional = delivery.additional == 0 ? 1 : delivery.additional; |
|
|
|
for (let i = 0; i < number;) { |
|
|
|
if (i === 0) { |
|
|
|
deliveryPrice = deliveryPrice + parseInt(delivery.first_fee); |
|
|
|
i = i + parseInt(delivery.first); |
|
|
|
} else { |
|
|
|
deliveryPrice = deliveryPrice + parseInt(delivery.additional_fee); |
|
|
|
i = i + parseInt(delivery.additional); |
|
|
|
} |
|
|
|
} |
|
|
|
if(this.total<299000){ |
|
|
|
deliveryPrice=30000 |
|
|
|
} |
|
|
|
// if (delivery.hasOwnProperty('id')) { |
|
|
|
// if (delivery.min > number) { |
|
|
|
// this.$api.msg('必须至少购买' + delivery.min + '件商品才能使用此配送方式', 6000) |
|
|
|
// } |
|
|
|
// // 如何为0就赋值1,不然下面的循环会死循环 |
|
|
|
// delivery.first = delivery.first == 0 ? 1 : delivery.first; |
|
|
|
// delivery.additional = delivery.additional == 0 ? 1 : delivery.additional; |
|
|
|
// for (let i = 0; i < number;) { |
|
|
|
// if (i === 0) { |
|
|
|
// deliveryPrice = deliveryPrice + parseInt(delivery.first_fee); |
|
|
|
// i = i + parseInt(delivery.first); |
|
|
|
// } else { |
|
|
|
// deliveryPrice = deliveryPrice + parseInt(delivery.additional_fee); |
|
|
|
// i = i + parseInt(delivery.additional); |
|
|
|
// } |
|
|
|
// } |
|
|
|
// } |
|
|
|
this.deliveryPrice = deliveryPrice.toFixed(2); |
|
|
|
total = total + deliveryPrice; |
|
|
|
} |
|
|
|