From cc33dd29eb1d38f4330ea8346c2c5c11e8d693e9 Mon Sep 17 00:00:00 2001 From: zdl <3489966805@qq.com> Date: Fri, 12 Dec 2025 19:20:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=98=8E=E6=96=87=20U?= =?UTF-8?q?RL=20Scheme=20path=20=E7=BC=96=E7=A0=81=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - path 参数不再进行 URL encode,微信要求原始路径格式 - 修复跳转微信后提示"当前页面无法访问"的问题 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../MiniProgramLauncher/UrlSchemeLauncher.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/components/MiniProgramLauncher/UrlSchemeLauncher.js b/src/components/MiniProgramLauncher/UrlSchemeLauncher.js index eb861f84..8d618640 100644 --- a/src/components/MiniProgramLauncher/UrlSchemeLauncher.js +++ b/src/components/MiniProgramLauncher/UrlSchemeLauncher.js @@ -28,16 +28,14 @@ const MINIPROGRAM_APPID = 'wx0edeaab76d4fa414'; /** * 生成明文 URL Scheme * 格式:weixin://dl/business/?appid=APPID&path=PATH&query=QUERY + * 注意:path 不需要 URL encode,否则微信无法识别 */ const generatePlainUrlScheme = (path, query) => { - const params = new URLSearchParams({ - appid: MINIPROGRAM_APPID, - path: path || '', - }); + let url = `weixin://dl/business/?appid=${MINIPROGRAM_APPID}&path=${path || ''}`; if (query) { - params.set('query', query); + url += `&query=${encodeURIComponent(query)}`; } - return `weixin://dl/business/?${params.toString()}`; + return url; }; /**