Commit 5606b0b0 by 高淑倩

订单列表状态

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