修复订单列表 tab 切换叠加问题

This commit is contained in:
YunaiV
2024-03-01 13:20:39 +08:00
parent fe76f2fc90
commit 12332f0f30
2 changed files with 8 additions and 20 deletions
+5 -11
View File
@@ -91,13 +91,7 @@
isEmpty
} from 'lodash';
import OrderApi from '@/sheep/api/trade/order';
const paginationNull = {
list: [],
total: 0,
pageNo: 1,
pageSize: 5,
};
import { resetPagination } from '@/sheep/util';
// 数据
const state = reactive({
@@ -138,7 +132,7 @@
return;
}
// 重头加载代码
state.pagination = paginationNull;
resetPagination(state.pagination);
state.currentTab = e.index;
getOrderList();
}
@@ -191,8 +185,8 @@
// 正常的确认收货流程
const { code } = await OrderApi.receiveOrder(order.id);
if (code === 0) {
state.pagination = paginationNull;
await getOrderList();
resetPagination(state.pagination);
await getOrderList();
}
}
@@ -315,7 +309,7 @@
// 下拉刷新
onPullDownRefresh(() => {
state.pagination = paginationNull;
resetPagination(state.pagination);
getOrderList();
setTimeout(function() {
uni.stopPullDownRefresh();