Commit e3e661c2 by 高淑倩

警告

parent 4323ce1c
......@@ -26,9 +26,38 @@ wxService.page({
onShow: function () {
const { code, logisticsNo} = this.options
console.log('-----code----', code)
this.getLogisticsInfo(code, logisticsNo)
if(code){
this.getLogisticsInfo(code, logisticsNo)
}
},
// 确认收货
handelConfirmReceipt(e) {
const { id } = e.currentTarget.dataset
wx.showLoading({
title: '加载中',
mask: true
})
wxService.post(`/sale/trade/buyer/confirm/${id}`).then(res => {
if (res) {
const { result, data } = res.data
if (result == 0) {
wx.hideLoading()
wx.showToast({
title: `您已确认收货!`,
icon: 'none'
})
setTimeout(() => {
this.initOrderList(this.data.pageNo, this.data.pageSize, this.data.trade)
}, 200)
} else {
wx.showToast({
title: `确认收货失败!`,
icon: 'none'
})
}
}
})
},
// 获取物流信息
getLogisticsInfo(code,num){
wxService.get(`/sale/logistics/getLogisticsDetail?companyCode=${code}&logisticsNo=${num}`).then(res => {
......
......@@ -56,7 +56,7 @@
</view>
<view class="button-wrap">
<button class="btn btn-primary btn-lg">确认收货</button>
<button class="btn btn-primary btn-lg" bindtap="handelConfirmReceipt">确认收货</button>
<button class="btn btn-lg btn-gray">申请退货</button>
</view>
</view>
......
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