|
@@ -83,7 +83,7 @@
|
|
|
<view class="pay-type">
|
|
|
<view class="title">支付方式</view>
|
|
|
<radio-group @change="payTypeChange" >
|
|
|
- <view class="item" v-if="checkPayType('1')" >
|
|
|
+ <view class="item" v-if="checkPayType('1')&&choose!=1" >
|
|
|
<view class="left" >
|
|
|
<image src="/static/images/wecha_pay.png" mode=""></image>
|
|
|
<text class="text">全款支付</text>
|
|
@@ -101,7 +101,7 @@
|
|
|
<radio :value="2" :checked="payType=='2'" />
|
|
|
</label>
|
|
|
</view>
|
|
|
- <view class="item" v-if="checkPayType('3')" >
|
|
|
+ <view class="item" v-if="checkPayType('3')&&choose!=2" >
|
|
|
<view class="left">
|
|
|
<image src="/static/images/pay_1.png" mode=""></image>
|
|
|
<text class="text">货到付款</text>
|
|
@@ -213,11 +213,13 @@
|
|
|
payDelivery:0,
|
|
|
payPrice:0,
|
|
|
gifts:[],
|
|
|
-
|
|
|
+ choose: 0
|
|
|
|
|
|
}
|
|
|
},
|
|
|
onLoad(option) {
|
|
|
+ this.choose = option.choose || 0
|
|
|
+ this.payType = this.choose == 1 ? 3:this.choose == 2 ? 1 :this.payType
|
|
|
this.orderId=option.orderId;
|
|
|
var that=this;
|
|
|
uni.$on('updateAddress', (e) => {
|
|
@@ -229,7 +231,7 @@
|
|
|
},
|
|
|
onShow() {
|
|
|
this.getPackageOrderById();
|
|
|
- this.getPackageById();
|
|
|
+ // this.getPackageById();
|
|
|
this.getConfigByKey();
|
|
|
},
|
|
|
|
|
@@ -366,7 +368,8 @@
|
|
|
res => {
|
|
|
if(res.code==200){
|
|
|
this.order=res.order
|
|
|
-
|
|
|
+ this.choose = res.choose || 0
|
|
|
+ this.payType = this.choose == 1 ? 3:this.choose == 2 ? 1 :this.payType
|
|
|
this.compute();
|
|
|
this.getPackageById(this.order.packageId)
|
|
|
}else{
|
|
@@ -377,12 +380,19 @@
|
|
|
);
|
|
|
},
|
|
|
getPackageById(packageId){
|
|
|
- var data={packageId:packageId};
|
|
|
+ let data={packageId:packageId};
|
|
|
+ if(this.choose == 1 || this.choose == 2) {
|
|
|
+ data={
|
|
|
+ packageId:packageId,
|
|
|
+ choose: this.choose
|
|
|
+ };
|
|
|
+ }
|
|
|
getPackageById(data).then(
|
|
|
res => {
|
|
|
if(res.code==200){
|
|
|
this.package=res.data;
|
|
|
this.payTypes=res.data.payType.split(',');
|
|
|
+ this.payType=this.choose == 1 ? 3:this.choose == 2 ? 1 :this.payType
|
|
|
console.log(this.payTypes)
|
|
|
this.getMyEnableCouponList();
|
|
|
}else{
|