[订单拆分,周五福利添加配送方式]
This commit is contained in:
@@ -20,7 +20,7 @@ Page({
|
||||
addressShow : false, //收货地址显示
|
||||
getType : '', //是否显示自提
|
||||
platIndex : 0, //选择提交方式下标
|
||||
isdeliver : '',
|
||||
isdeliver : -1,
|
||||
platformCp : [], //选择提交数组
|
||||
pointMoreShow: false,
|
||||
from : '',
|
||||
@@ -32,8 +32,8 @@ Page({
|
||||
disabled : false,
|
||||
payWayIndex : 0,
|
||||
payWay :[
|
||||
{value: 0, name: "微信支付"},
|
||||
{value: 1, name: "沃钱包支付"}
|
||||
{value: 0, name: "微信支付"}
|
||||
// {value: 1, name: "沃钱包支付"}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -70,6 +70,15 @@ Page({
|
||||
return { ...obj[val], ...{key: val} }
|
||||
})
|
||||
|
||||
if(this.data.isdeliver == -1){
|
||||
if(res.data.detail.type == 'physical') {
|
||||
this.setData({
|
||||
isdeliver : res.data.detail.def_get
|
||||
})
|
||||
}
|
||||
if(res.data.detail.type == 'virtual') this.setData({isdeliver : 1})
|
||||
}
|
||||
|
||||
this.setData({
|
||||
address : res.data.address,
|
||||
allAddress : res.data.all_address,
|
||||
@@ -264,7 +273,7 @@ Page({
|
||||
isdeliver: this.data.detail.def_get
|
||||
})
|
||||
}
|
||||
let right_id = this.data.detail.right_id,
|
||||
let right_id = this.data.detail.right_id,
|
||||
address_id = this.data.address.id,
|
||||
is_deliver = this.data.isdeliver,
|
||||
qty = this.data.num
|
||||
@@ -277,9 +286,15 @@ Page({
|
||||
duration: 2000
|
||||
})
|
||||
setTimeout(()=>{
|
||||
wx.reLaunch({
|
||||
url: '/pages/order/order'
|
||||
})
|
||||
if(this.data.isdeliver == 1) {
|
||||
wx.reLaunch({
|
||||
url: '/pages/order/order?orderType=rightsCoupons'
|
||||
})
|
||||
} else {
|
||||
wx.reLaunch({
|
||||
url: '/pages/order/order?orderType=rights'
|
||||
})
|
||||
}
|
||||
},3000)
|
||||
this.setData({
|
||||
rightsTap: true
|
||||
@@ -302,16 +317,34 @@ Page({
|
||||
icon : 'success'
|
||||
})
|
||||
setTimeout(()=>{
|
||||
wx.reLaunch({
|
||||
url: '/pages/coupon/coupon?type=couponPublic'
|
||||
})
|
||||
if(this.data.isdeliver == 1) {
|
||||
wx.reLaunch({
|
||||
url: '/pages/order/order?orderType=rightsCoupons'
|
||||
})
|
||||
} else {
|
||||
wx.reLaunch({
|
||||
url: '/pages/order/order?orderType=rights'
|
||||
})
|
||||
}
|
||||
// wx.reLaunch({
|
||||
// url: '/pages/coupon/coupon?type=couponPublic'
|
||||
// })
|
||||
},3000)
|
||||
}
|
||||
},
|
||||
fail : res=>{
|
||||
wx.reLaunch({
|
||||
url: '/pages/order/order?stateType=unpay'
|
||||
})
|
||||
if(this.data.isdeliver == 1) {
|
||||
wx.reLaunch({
|
||||
url: '/pages/order/order?orderType=rightsCoupons&stateType=unpay'
|
||||
})
|
||||
} else {
|
||||
wx.reLaunch({
|
||||
url: '/pages/order/order?orderType=rights&stateType=unpay'
|
||||
})
|
||||
}
|
||||
// wx.reLaunch({
|
||||
// url: '/pages/order/order?stateType=unpay'
|
||||
// })
|
||||
}
|
||||
})
|
||||
})
|
||||
@@ -343,7 +376,7 @@ Page({
|
||||
},
|
||||
|
||||
/**
|
||||
* 新增收货地址
|
||||
* 重要提示显示
|
||||
*/
|
||||
pointMoreTap() {
|
||||
this.setData({
|
||||
|
||||
Reference in New Issue
Block a user