test(web_view): 测试按钮直接传 H5 URL 并加调试日志

不再依赖 scene/wxscene 参数传递(参数名可能被微信拦截)
改为直接传 ?url=encoded_h5_url
同时 web_view onLoad 打印所有 option 参数供排错
This commit is contained in:
2026-07-08 18:40:18 +08:00
parent 0e9ce6f7d6
commit 61caf4eb50
2 changed files with 5 additions and 2 deletions

View File

@@ -107,6 +107,9 @@ export default {
}
},
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=<identifier>" 时调 box_app 查 url
// 例如 box_app /api/wxacode?app=pregnancy → scene="app=pregnancy"
// CRMEB 收到后查 box_app /api/mp/apps?isPublished=1 找 url,跳对应 H5

View File

@@ -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"
});
}
}