Commit 5606b0b0 by 高淑倩

订单列表状态

parent 73d89965
......@@ -44,7 +44,7 @@ wxService.page({
orderList: null,
totalPages: 0,
subImgs: [],
trade: '', // 订单状态(C:取消;N:新建,P:已支付;D:已发货;R:已收货)
status: '', // 订单状态(C:取消;N:新建,P:已支付;D:已发货;R:已收货)
no_data: true,
currentTradeId: ''
},
......@@ -70,9 +70,7 @@ wxService.page({
pageNo: 1,
pageSize: 5
}, () => {
const params = { trade: this.data.trade }
this.initOrderList(this.data.pageNo, this.data.pageSize, params)
// this.initOrderList(this.data.pageNo, this.data.pageSize, this.data.trade)
this.initOrderList(this.data.pageNo, this.data.pageSize, this.data.status)
})
}
......@@ -96,7 +94,7 @@ wxService.page({
icon: 'none'
})
setTimeout(() => {
this.initOrderList(this.data.pageNo, this.data.pageSize, this.data.trade)
this.initOrderList(this.data.pageNo, this.data.pageSize, this.data.status)
}, 200)
} else {
wx.showToast({
......@@ -229,14 +227,14 @@ wxService.page({
currentIndex: type,
pageNo: 1,
orderList: [],
trade: '',
status: '',
no_data: true
}, () => {
if (type == 5 && status == 'RF') {
this.getRefundList(this.data.pageNo, this.data.pageSize)
} else {
this.setData({
trade: status
status: status
}, () => {
this.initOrderList(this.data.pageNo, this.data.pageSize, status)
})
......@@ -244,13 +242,13 @@ wxService.page({
}
})
},
initOrderList(pageNo, pageSize, trade) {
console.log('-------------', trade)
initOrderList(pageNo, pageSize, status) {
console.log('-------------', status)
wx.showLoading({
title: '加载中',
mask: true
})
const params = { trade }
const params = { status: status }
wxService.post(`/sale/trade/buyer/history?pageNum=${pageNo}&pageSize=${pageSize}`, params).then(res => {
if (res) {
const { result, data } = res.data
......@@ -354,7 +352,7 @@ wxService.page({
this.setData({
pageNo: this.data.pageNo + 1,
}, () => {
this.initOrderList(this.data.pageNo, this.data.pageSize, this.data.trade)
this.initOrderList(this.data.pageNo, this.data.pageSize, this.data.status)
})
},
......
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