fix(webview&form): 适配小程序webview跳转场景

1. 给h5和小程序端webview页面分别处理src参数,小程序端添加from=mp-webview参数
2. 新增isFromMpWebView标识,从跳转参数判断是否来自小程序webview
3. 非小程序webview场景下才设置页面导航栏标题
This commit is contained in:
2026-05-28 16:07:38 +08:00
parent 00870e4554
commit a6189a5f9e
2 changed files with 16 additions and 4 deletions

View File

@@ -18,7 +18,13 @@ export default {
};
},
onLoad(option) {
// #ifdef H5
this.src = decodeEntity(decodeURIComponent(option.src));
// #endif
// #ifndef H5
this.src = decodeEntity(decodeURIComponent(`${option.src}&from=mp-webview`));
// #endif
},
methods: {
navigateBack() {