From 61caf4eb5012317c84c34ef689764b112364c095 Mon Sep 17 00:00:00 2001 From: Karlcarlo Date: Wed, 8 Jul 2026 18:40:18 +0800 Subject: [PATCH] =?UTF-8?q?test(web=5Fview):=20=E6=B5=8B=E8=AF=95=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E7=9B=B4=E6=8E=A5=E4=BC=A0=20H5=20URL=20=E5=B9=B6?= =?UTF-8?q?=E5=8A=A0=E8=B0=83=E8=AF=95=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 不再依赖 scene/wxscene 参数传递(参数名可能被微信拦截) 改为直接传 ?url=encoded_h5_url 同时 web_view onLoad 打印所有 option 参数供排错 --- pages/annex/web_view/index.vue | 5 ++++- pages/user/index.vue | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pages/annex/web_view/index.vue b/pages/annex/web_view/index.vue index 529a39c..4ca7fb5 100644 --- a/pages/annex/web_view/index.vue +++ b/pages/annex/web_view/index.vue @@ -106,7 +106,10 @@ export default { savedUrl: '' } }, - onLoad(option) { + onLoad(option) { + console.log("[web_view] !=== onLoad 完整 option:", JSON.stringify(option)); + console.log("[web_view] !=== option keys:", JSON.stringify(Object.keys(option))); + console.log("[web_view] !=== option.url:", option.url); // 太阳码 scene 解析:scene="app=" 时调 box_app 查 url // 例如 box_app /api/wxacode?app=pregnancy → scene="app=pregnancy" // CRMEB 收到后查 box_app /api/mp/apps?isPublished=1 找 url,跳对应 H5 diff --git a/pages/user/index.vue b/pages/user/index.vue index 6863dee..af86066 100644 --- a/pages/user/index.vue +++ b/pages/user/index.vue @@ -638,7 +638,7 @@ export default { ,goWxacodeTest() { console.log("[user] 太阳码扫码测试"); uni.navigateTo({ - url: "/pages/annex/web_view/index?wxscene=app=pregnancy" + url: "/pages/annex/web_view/index?url=https%3A%2F%2Fmp.yizhezhe.com%2Fapp_03%2Fhome" }); } }