...
|
...
|
@@ -7,7 +7,8 @@ const initailData = () => ({ |
|
|
pullUpLoad: true,
|
|
|
|
|
|
// 当前查询订单状态
|
|
|
currentStatus: 1,
|
|
|
currentStatus: null,
|
|
|
routeParamStatus: null,
|
|
|
isShowEmpty: false,
|
|
|
});
|
|
|
|
...
|
...
|
@@ -37,9 +38,10 @@ export default function() { |
|
|
state.isShowEmpty = state.orderList.length === 0;
|
|
|
},
|
|
|
setOrderStatus(state, currentStatus) {
|
|
|
if (currentStatus) {
|
|
|
state.currentStatus = +currentStatus;
|
|
|
}
|
|
|
state.currentStatus = +currentStatus;
|
|
|
},
|
|
|
setRouteParamStatus(state, status = 1) {
|
|
|
state.routeParamStatus = +status;
|
|
|
},
|
|
|
resetPartialData(state) {
|
|
|
state.page = 1;
|
...
|
...
|
@@ -70,14 +72,14 @@ export default function() { |
|
|
async fetchOrderList(
|
|
|
{
|
|
|
commit,
|
|
|
state: { page, currentStatus },
|
|
|
state: { page, currentStatus, routeParamStatus },
|
|
|
},
|
|
|
param = {},
|
|
|
) {
|
|
|
const { owner, status } = param;
|
|
|
const { owner } = param;
|
|
|
const res = await this.$api.get('/api/order/list', {
|
|
|
tabType: owner,
|
|
|
type: status || currentStatus,
|
|
|
type: currentStatus || routeParamStatus,
|
|
|
page,
|
|
|
});
|
|
|
|
...
|
...
|
|