Commit e086caa9 by 高淑倩

modify: 订单详情_接口

parent 9be9c637
......@@ -26,10 +26,30 @@ wxService.page({
const { id } = this.options
let detailOrderList = wx.getStorageSync('orderList')
let currentDetail = detailOrderList.filter(item => item.id == id)
// if (!Object.keys(this.options).length){ return }
this.setData({
detail: currentDetail[0]
// /trade/buyer/{id} 订单详情
console.log('id', id)
if(id) {
this.getOrderDetail(id)
}
// this.setData({
// detail: currentDetail[0]
// })
},
getOrderDetail(id){
wx.showLoading({
title: '加载中',
mask: true
})
wxService.get(`/sale/trade/buyer/${id}`).then(res => {
if (res) {
const { result, data } = res.data
if (result == 0) {
wx.hideLoading()
this.setData({
detail: data
})
}
}
})
},
// 删除订单
......
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