fix(formdata): 适配多端页面标题设置逻辑

调整导航栏标题设置代码,兼容WebView内核场景,同时保留H5和小程序的标题设置能力
This commit is contained in:
2026-05-29 08:56:20 +08:00
parent 800cdbc805
commit dfbcd0c9a5

View File

@@ -109,14 +109,10 @@ export default {
if (res.code == 0 && res.data) { if (res.code == 0 && res.data) {
this.detail = res.data this.detail = res.data
console.log(`form data =>`, this.detail) console.log(`form data =>`, this.detail)
// 非H5的情况下,设置标题
if (!this.isFromMpWebView) {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: res.data.form_name title: res.data.form_name
}) })
} }
}
this.$refs.loadingCover && this.$refs.loadingCover.hide() this.$refs.loadingCover && this.$refs.loadingCover.hide()
}, },
fail: () => { fail: () => {