|
@@ -138,10 +138,21 @@ async function getList() {
|
|
|
}
|
|
|
|
|
|
const getListData = async (orderStatus = tab.value) => {
|
|
|
- const res = await userMainOrderList({
|
|
|
- orderStatus: orderStatus
|
|
|
- })
|
|
|
- dataList.value = res.rows
|
|
|
+ // 如果dataList已经有数据,则从dataList中获取orderStatus
|
|
|
+ if (dataList.value && dataList.value.length > 0) {
|
|
|
+ const statusList = dataList.value.map(item => item.orderStatus);
|
|
|
+ const statusString = statusList.join(',');
|
|
|
+ const res = await userMainOrderList({
|
|
|
+ orderStatus: statusString
|
|
|
+ });
|
|
|
+ dataList.value = res.rows;
|
|
|
+ } else {
|
|
|
+ // 首次加载时使用传入的orderStatus
|
|
|
+ const res = await userMainOrderList({
|
|
|
+ orderStatus: orderStatus
|
|
|
+ });
|
|
|
+ dataList.value = res.rows;
|
|
|
+ }
|
|
|
}
|
|
|
/**
|
|
|
* 1: 查看
|
|
@@ -166,7 +177,6 @@ function btnClick(row, type) {
|
|
|
}
|
|
|
|
|
|
//前往沟通
|
|
|
-
|
|
|
// wxMakePhoneCall(phone)
|
|
|
// uni.navigateTo({
|
|
|
// url: `/pages_orderuser/pages/talk/pages/index/index?orderId=${row.secondOrderId}`
|