|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <view class="container order clearfix">
|
|
|
+ <view class="container order clearfix" :style="{paddingBottom :isIphoneX ? '170rpx' : '134rpx'}">
|
|
|
<!-- 透明模态层 -->
|
|
|
<modal-layer v-if='modallayer'></modal-layer>
|
|
|
<!-- 地址选择 -->
|
|
@@ -226,26 +226,38 @@
|
|
|
}
|
|
|
},
|
|
|
attributeNofreight(){//计算没有邮费的支付价格
|
|
|
- if(this.userMoney>this.payAllPrice){
|
|
|
- this.payAllPrice = 0.00
|
|
|
- this.deductMoney = this.allPrice //勾选后使用抵余额
|
|
|
- this.surplusMoney = this.userMoney - this.deductMoney //勾选后的剩余抵扣
|
|
|
+ if(this.ischecked){
|
|
|
+ if(this.userMoney>this.payAllPrice){
|
|
|
+ this.payAllPrice = 0.00
|
|
|
+ this.deductMoney = this.allPrice //勾选后使用抵余额
|
|
|
+ this.surplusMoney = this.userMoney - this.deductMoney //勾选后的剩余抵扣
|
|
|
+ }else{
|
|
|
+ this.payAllPrice = this.allPrice - this.userMoney //勾选后的总价
|
|
|
+ this.deductMoney = this.userMoney //勾选后使用抵余额
|
|
|
+ this.surplusMoney = this.userMoney - this.deductMoney //勾选后的剩余抵扣
|
|
|
+ }
|
|
|
}else{
|
|
|
- this.payAllPrice = this.allPrice - this.userMoney //勾选后的总价
|
|
|
- this.deductMoney = this.userMoney //勾选后使用抵余额
|
|
|
- this.surplusMoney = this.userMoney - this.deductMoney //勾选后的剩余抵扣
|
|
|
+ this.payAllPrice = this.allPrice;
|
|
|
+ this.deductMoney = 0.00;
|
|
|
+ this.surplusMoney = this.userMoney;
|
|
|
}
|
|
|
},
|
|
|
attributeHashfreight(freight){//计算需要邮费的支付价格
|
|
|
this.payAllPrice = this.allPrice+parseInt(freight)//计算不包邮的价格 总价等于商品价格+邮费
|
|
|
- if(this.userMoney>this.payAllPrice){ //余额大于支付金额
|
|
|
- this.payAllPrice =0.00
|
|
|
- this.deductMoney = this.allPrice+parseInt(freight) //勾选后使用抵余额
|
|
|
- this.surplusMoney = this.userMoney - this.deductMoney //勾选后的剩余抵扣
|
|
|
+ if(this.ischecked){
|
|
|
+ if(this.userMoney>this.payAllPrice){ //余额大于支付金额
|
|
|
+ this.payAllPrice =0.00
|
|
|
+ this.deductMoney = this.allPrice+parseInt(freight) //勾选后使用抵余额
|
|
|
+ this.surplusMoney = this.userMoney - this.deductMoney //勾选后的剩余抵扣
|
|
|
+ }else{
|
|
|
+ this.payAllPrice = this.allPrice+parseInt(freight) - this.userMoney //勾选后的总价
|
|
|
+ this.deductMoney = this.userMoney //勾选后使用抵余额
|
|
|
+ this.surplusMoney = this.userMoney - this.deductMoney //勾选后的剩余抵扣
|
|
|
+ }
|
|
|
}else{
|
|
|
- this.payAllPrice = this.allPrice+parseInt(freight) - this.userMoney //勾选后的总价
|
|
|
- this.deductMoney = this.userMoney //勾选后使用抵余额
|
|
|
- this.surplusMoney = this.userMoney - this.deductMoney //勾选后的剩余抵扣
|
|
|
+ this.payAllPrice = this.allPrice+parseInt(freight)
|
|
|
+ this.deductMoney = 0.00
|
|
|
+ this.surplusMoney = this.userMoney
|
|
|
}
|
|
|
},
|
|
|
orderSubmitMit(){//提交订单
|
|
@@ -336,9 +348,6 @@
|
|
|
transition-duration: 0.3s;
|
|
|
transition-timing-function: ease;
|
|
|
}
|
|
|
- .order{
|
|
|
- padding-bottom: 134rpx;
|
|
|
- }
|
|
|
.invoice-freight{
|
|
|
width: 702rpx;
|
|
|
padding: 0 24rpx;
|