Commit c15a27d8 by 谢中龙

修改订单详情

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