From 730c4e2a6ad41f7e966f562ec1ef11f15e73ef23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=B3=89=E4=BD=B3?= <1107186916@qq.com> Date: Tue, 29 Sep 2026 01:33:58 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=AE=A4=E9=A2=86=E7=BB=93=E6=9E=9C?= =?UTF-8?q?=E5=9B=9E=E5=86=99/=E6=B5=81=E6=B0=B4=E5=90=8C=E6=AD=A5=200=20?= =?UTF-8?q?=E6=9D=A1=E6=97=B6=E6=8F=90=E7=A4=BA=20NaN=E2=80=94=E2=80=94unw?= =?UTF-8?q?rapData=20=E5=88=A4=E7=A9=BA=E6=94=B9=20=3F=3F=20=E4=BF=9D?= =?UTF-8?q?=E7=95=99=E5=90=88=E6=B3=95=E6=95=B0=E5=AD=97=200?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/payment/receipt-claim-record.vue | 5 +++-- src/views/payment/receipt-flow.vue | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/views/payment/receipt-claim-record.vue b/src/views/payment/receipt-claim-record.vue index 4b93166..362a0f3 100644 --- a/src/views/payment/receipt-claim-record.vue +++ b/src/views/payment/receipt-claim-record.vue @@ -202,8 +202,9 @@ export default { }, methods: { unwrapData(response) { - const body = response?.data || response || {}; - return body?.data || body; + // 数字 0 是合法返回值(如回写/同步 0 条),须用 ?? 判空避免 0 被信封对象顶掉导致 Number() 得 NaN + const body = response?.data ?? response ?? {}; + return body?.data ?? body; }, queryParams() { const transactionRange = this.query.transactionDateRange || []; diff --git a/src/views/payment/receipt-flow.vue b/src/views/payment/receipt-flow.vue index 1490efd..883eda2 100644 --- a/src/views/payment/receipt-flow.vue +++ b/src/views/payment/receipt-flow.vue @@ -295,8 +295,9 @@ export default { }, methods: { unwrapData(response) { - const body = response?.data || response || {}; - return body?.data || body; + // 数字 0 是合法返回值(如回写/同步 0 条),须用 ?? 判空避免 0 被信封对象顶掉导致 Number() 得 NaN + const body = response?.data ?? response ?? {}; + return body?.data ?? body; }, async loadTable() { this.loading = true;