|
@@ -297,11 +297,18 @@ import { registerRuntimeCompiler } from "vue"
|
|
}
|
|
}
|
|
this.totalPrice = 0
|
|
this.totalPrice = 0
|
|
this.totalFreight = 0
|
|
this.totalFreight = 0
|
|
|
|
+ let num = 0
|
|
for (let item of data) {
|
|
for (let item of data) {
|
|
this.totalPrice += Number(item.price) * Number(item.goodsNum)
|
|
this.totalPrice += Number(item.price) * Number(item.goodsNum)
|
|
|
|
+ num += Number(item.goodsNum)
|
|
if (Number(item.goodsNum) == 1) {
|
|
if (Number(item.goodsNum) == 1) {
|
|
this.totalFreight += 5
|
|
this.totalFreight += 5
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ console.log('num',num);
|
|
|
|
+ if(num>1){
|
|
|
|
+ this.totalFreight = 0
|
|
}
|
|
}
|
|
this.totalFreight = this.totalFreight.toFixed(2)
|
|
this.totalFreight = this.totalFreight.toFixed(2)
|
|
this.totalPrice = this.totalPrice.toFixed(2)
|
|
this.totalPrice = this.totalPrice.toFixed(2)
|