Commit f635b40c by 高淑倩

下单页

parent 28815b8e
......@@ -348,7 +348,7 @@ wxService.page({
trolleySku2Buy,
addressId: addressId ? addressId : addressInfo.id // 微信地址 or 地址id
}
console.log('wwwwwwwwwwwwwwwparams', params)
this.getBill(params) // 下单
},
// 下单
......@@ -356,8 +356,11 @@ wxService.page({
wx.showLoading({
title: '加载中'
})
wxService.post(`/sale/payment/merged/buyer/bill`, params).then(res => {
const { isSelect} = this.data
let url = isSelect ? '/sale/payment/merged/buyer/bill' : '/sale/trade/buyer/bill'
// /trade/buyer/bill
// wxService.post(`/sale/payment/merged/buyer/bill`, params).then(res => {
wxService.post(`${url}`, params).then(res => {
if (res) {
const { result, data } = res.data
if (result == 0) {
......@@ -372,7 +375,7 @@ wxService.page({
},
fail(res) {
wx.hideLoading()
wxService.router(`/subPackage/page/pages/paymentStatus/paymentStatus?status=F`)
// wxService.router(`/subPackage/page/pages/paymentStatus/paymentStatus?status=F`)
}
}, data.wxParams))
}
......@@ -411,13 +414,13 @@ wxService.page({
addressInfo: _defalutAddress
}, () => {
// preview
// const { trolleySku2Buy, checkByPremium, addressId, addressInfo } = this.data
// let params = {
// checkByPremium,
// trolleySku2Buy,
// addressId: addressId ? addressId : addressInfo.id // 微信地址 or 地址id
// }
// this.calPreferentialPrice(params) // 计算优惠价
const { trolleySku2Buy, checkByPremium, addressId, addressInfo } = this.data
let params = {
checkByPremium,
trolleySku2Buy,
addressId: addressId ? addressId : addressInfo.id // 微信地址 or 地址id
}
this.calPreferentialPrice(params) // 计算优惠价
})
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment