Commit c15a27d8 by 谢中龙

修改订单详情

parent 8eb554a4
......@@ -304,7 +304,7 @@ wxService.page({
this.setData({
no_data: this.data.orderList.length ? true : false
})
wx.setStorageSync('orderList', this.data.orderList)
// wx.setStorageSync('orderList', this.data.orderList)
})
}
}
......
......@@ -26,16 +26,14 @@ wxService.page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.data.id = options.id;
wx.hideShareMenu()
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
const { id } = this.options
let detailOrderList = wx.getStorageSync('orderList')
let currentDetail = detailOrderList.filter(item => item.id == id)
// /trade/buyer/{id} 订单详情
const { id } = this.options;
if(id) {
this.setData({
id
......@@ -43,16 +41,13 @@ wxService.page({
this.getOrderDetail(id)
})
}
// this.setData({
// detail: currentDetail[0]
// })
},
getOrderDetail(id){
wx.showLoading({
title: '加载中',
mask: true
})
wxService.get(`/sale/trade/buyer/${id}`).then(res => {
wxService.get(`/sale/trade/seller/${id}`).then(res => {
if (res) {
const { result, data } = res.data
if (result == 0) {
......
......@@ -21,6 +21,7 @@ wxService.page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.data.id = options.id;
wx.hideShareMenu()
},
......
......@@ -205,7 +205,7 @@
"id": 24,
"name": "订单详情",
"pathName": "pages/orderDetail/orderDetail",
"query": "id=661154673541124096",
"query": "id=689550313044185088",
"scene": null
},
{
......
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