|
@@ -13,8 +13,8 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="freight-bean" v-if="isBeansShow">
|
|
|
- <view class="bean-le" v-if="freightData.freePostFlag == 1">可用{{ freightBeansMoney*100 }}采美豆抵用{{ freightBeansMoney }}元运费</view>
|
|
|
- <view class="bean-le" v-if="freightData.freePostFlag == -1">可用{{ freightBeansMoney*100 }}采美豆抵用{{ freightMoney }}运费</view>
|
|
|
+ <view class="bean-le" v-if="freightData.freePostFlag == 1">可用{{ deductionBeans }}采美豆抵用{{ freightBeansMoney }}元运费</view>
|
|
|
+ <view class="bean-le" v-if="freightData.freePostFlag == -1">可用{{ deductionBeans }}采美豆抵用{{ freightBeansMoney }}运费</view>
|
|
|
<view class="bean-ri">
|
|
|
<view class="checkbox-box">
|
|
|
<button class="checkbox iconfont"
|
|
@@ -49,6 +49,7 @@
|
|
|
ischecked:false,
|
|
|
isBeansShow:false,
|
|
|
userBeans:0,
|
|
|
+ deductionBeans:0,
|
|
|
freightBeansMoney:0,
|
|
|
|
|
|
}
|
|
@@ -75,23 +76,33 @@
|
|
|
this.userBeans = res.userBeans
|
|
|
this.freePostFlag = res.freePostFlag
|
|
|
this.optionList.unshift(this.orderPriceToFixed(this.freightMoney))
|
|
|
- if( res.userBeans >= this.freightMoney*100 ){
|
|
|
+ if( res.userBeans > 0 ){
|
|
|
this.isBeansShow = true
|
|
|
}else{
|
|
|
this.isBeansShow = false
|
|
|
}
|
|
|
+ if(res.userBeans >= this.freightBeansMoney*100){
|
|
|
+ this.deductionBeans = this.freightBeansMoney*100
|
|
|
+ }else{
|
|
|
+ this.deductionBeans = res.userBeans
|
|
|
+ }
|
|
|
break
|
|
|
case -1:
|
|
|
this.freightText = '到付'
|
|
|
this.userBeans = res.userBeans
|
|
|
this.freePostFlag = res.freePostFlag
|
|
|
this.freightData.freight = 0
|
|
|
- if( res.userBeans >= 3000 ){
|
|
|
- this.freightBeansMoney = 30
|
|
|
+ this.freightBeansMoney = 30
|
|
|
+ if( res.userBeans >0 ){
|
|
|
this.isBeansShow = true
|
|
|
}else{
|
|
|
this.isBeansShow = false
|
|
|
}
|
|
|
+ if(res.userBeans >= this.freightBeansMoney*100){
|
|
|
+ this.deductionBeans = this.freightBeansMoney*100
|
|
|
+ }else{
|
|
|
+ this.deductionBeans = res.userBeans
|
|
|
+ }
|
|
|
break
|
|
|
}
|
|
|
},
|
|
@@ -104,7 +115,7 @@
|
|
|
case 0:
|
|
|
self.freightMoney = self.infoData.freight
|
|
|
self.freePostFlag = 1
|
|
|
- if( self.userBeans >= self.freightMoney*100 ){
|
|
|
+ if( self.userBeans > 0 ){
|
|
|
self.isBeansShow = true
|
|
|
self.freightBeansMoney = self.freightMoney
|
|
|
}else{
|
|
@@ -115,7 +126,7 @@
|
|
|
case 1:
|
|
|
self.freePostFlag = -1
|
|
|
self.freightMoney = '到付'
|
|
|
- if( self.userBeans >= 3000 ){
|
|
|
+ if( self.userBeans > 0 ){
|
|
|
self.freightBeansMoney = 30
|
|
|
self.isBeansShow = true
|
|
|
}else{
|