diff --git a/pages_tool/form/formdata.vue b/pages_tool/form/formdata.vue index bc28779..ebf6622 100644 --- a/pages_tool/form/formdata.vue +++ b/pages_tool/form/formdata.vue @@ -38,7 +38,8 @@ export default { isRepeat: false, complete: false, scroll: true, - uniacid: 0 + uniacid: 0, + isFromMpWebView: false, // 是否是从微信小程序的WebView跳转过来的 } }, computed: { @@ -67,6 +68,7 @@ export default { this.uniacid = options.uniacid this.id = options.id || 0 + this.isFromMpWebView = options.from === 'mp-webview'; if (options.scene) { const scene = decodeURIComponent(options.scene) @@ -98,9 +100,13 @@ export default { if (res.code == 0 && res.data) { this.detail = res.data console.log(`form data =>`, this.detail) - uni.setNavigationBarTitle({ - title: res.data.form_name - }) + + // 非H5的情况下,设置标题 + if (!this.isFromMpWebView) { + uni.setNavigationBarTitle({ + title: res.data.form_name + }) + } } this.$refs.loadingCover && this.$refs.loadingCover.hide() }, diff --git a/pages_tool/webview/webview.vue b/pages_tool/webview/webview.vue index 36ad4d3..bd9f928 100644 --- a/pages_tool/webview/webview.vue +++ b/pages_tool/webview/webview.vue @@ -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() {