From 44ed97bc24ea853c67d20f8f0422febb3fc0589b Mon Sep 17 00:00:00 2001 From: ZhangYong Date: Sun, 25 Jan 2026 21:47:18 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B5=84=E9=87=91=E6=B5=81=E6=B0=B4=E8=B4=A6nu?= =?UTF-8?q?ll=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/moneyManage/financialAccount/cashFlow.vue | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/views/moneyManage/financialAccount/cashFlow.vue b/src/views/moneyManage/financialAccount/cashFlow.vue index 1f3de5d..76a99af 100644 --- a/src/views/moneyManage/financialAccount/cashFlow.vue +++ b/src/views/moneyManage/financialAccount/cashFlow.vue @@ -84,6 +84,18 @@ const getMarket = async () => { } } +const formatStatuses = (statuses) => { + // 情况1:非数组/空值 → 返回空数组 + if (!Array.isArray(statuses)) { + return []; + } + // 情况2:数组中包含 null 或 undefined → 返回空数组 + if (statuses.some(item => item === null || item === undefined)) { + return []; + } + // 情况3:正常数组 → 返回原数组 + return statuses; +}; // 查询列表 const fetchData = async () => { loading.value = true @@ -99,11 +111,13 @@ const fetchData = async () => { endTime: queryParams.timeRange?.[1] ? dayjs(queryParams.timeRange[1]).format('YYYY-MM-DD HH:mm:ss') : '', payType: normalizePayType(queryParams.payType || ''), orderCode: queryParams.orderCode, - statuses: queryParams.statuses, + statuses: formatStatuses(queryParams.statuses), markets:[], } } + + console.log('查询参数:', params) const res = await Moneyfunds(params) if (res.code == 200) {