调整配送方式
This commit is contained in:
@@ -18,11 +18,12 @@ Page({
|
||||
freight : '', // 运费
|
||||
weight : '', // 重量
|
||||
distribution : [
|
||||
{ type: 0, title: "选择配送方式" },
|
||||
{ type: 1, title: "快递" },
|
||||
{ type: 2, title: "自提" },
|
||||
{ type: 2, title: "选择配送方式" },
|
||||
{ type: 0, title: "快递" },
|
||||
{ type: 1, title: "自提" },
|
||||
],
|
||||
distributionIndex: 0
|
||||
distributionIndex: 0,
|
||||
distributionType : 2
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -42,7 +43,8 @@ Page({
|
||||
distributionChange(e){
|
||||
if(e.detail.value === this.data.distributionIndex) return
|
||||
this.setData({
|
||||
distributionIndex: e.detail.value
|
||||
distributionIndex : e.detail.value,
|
||||
distributionType : this.data.distribution[e.detail.value].type
|
||||
})
|
||||
this.placeInfo(this.data.skuId);
|
||||
},
|
||||
@@ -94,7 +96,7 @@ Page({
|
||||
cart_ids : this.data.skuId,
|
||||
address_id : this.data.address.address_id,
|
||||
remark : '',
|
||||
delivery_type : this.data.distributionIndex
|
||||
delivery_type : this.data.distributionType
|
||||
}).then(res => {
|
||||
wx.redirectTo({
|
||||
url: '/pages/pay/index?params=' + encodeURIComponent(JSON.stringify(res.data))
|
||||
|
||||
Reference in New Issue
Block a user