fix(webview&form): 适配小程序webview跳转场景
1. 给h5和小程序端webview页面分别处理src参数,小程序端添加from=mp-webview参数 2. 新增isFromMpWebView标识,从跳转参数判断是否来自小程序webview 3. 非小程序webview场景下才设置页面导航栏标题
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user