From 414f2cd320b38ab35061ce2af6789adac40c9318 Mon Sep 17 00:00:00 2001 From: zhoulinf <2507241354@qq.com> Date: Tue, 27 Jan 2026 14:12:40 +0800 Subject: [PATCH] =?UTF-8?q?h5=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/res/year-statistic/index.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/public/res/year-statistic/index.html b/public/res/year-statistic/index.html index 00ab8718..97e678ac 100644 --- a/public/res/year-statistic/index.html +++ b/public/res/year-statistic/index.html @@ -954,7 +954,13 @@ // 获取URL参数 function getProviderIdFromUrl() { const urlParams = new URLSearchParams(window.location.search); - return urlParams.get('providerId') || null; + // return urlParams.get('providerId') || null; + let providerId = urlParams.get('providerId'); + // 处理URL格式错误的情况(如 ?providerId=33041?token=xxx,第二个?应该是&) + if (providerId && providerId.includes('?')) { + providerId = providerId.split('?')[0]; + } + return providerId || null; } // 读取JSON文件