From dcd90f4c7f5343f93470c1784739f71a3d5dfccf Mon Sep 17 00:00:00 2001 From: xuminyui <576362016@qq.com> Date: Fri, 25 Oct 2024 15:06:31 +0800 Subject: [PATCH] fix --- src/pages/detail/index.vue | 6 +++++- src/pages/index/index.vue | 6 +++++- src/pages/painting/index.vue | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/pages/detail/index.vue b/src/pages/detail/index.vue index 29fb7d8..83819d9 100644 --- a/src/pages/detail/index.vue +++ b/src/pages/detail/index.vue @@ -115,7 +115,11 @@ onLoad((options) => { if (window.plus) { const token = plus?.webview.getWebviewById("wv").tokenScan; if (token) { - document.querySelector(".uni-page-head-hd").style.display = "none"; + const header = document.querySelector(".uni-page-head-hd"); + console.log("header", header); + if (header) { + header.style.display = "none"; + } } } diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index bb72b1f..fd53023 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -165,7 +165,11 @@ onLoad((options) => { if (window.plus) { const token = plus?.webview.getWebviewById("wv").tokenScan; if (token) { - document.querySelector(".uni-page-head-hd").style.display = "none"; + const header = document.querySelector(".uni-page-head-hd"); + console.log("header", header); + if (header) { + header.style.display = "none"; + } } } state.id = options.id; diff --git a/src/pages/painting/index.vue b/src/pages/painting/index.vue index abf7711..166fab6 100644 --- a/src/pages/painting/index.vue +++ b/src/pages/painting/index.vue @@ -72,7 +72,11 @@ onLoad((options) => { if (window.plus) { const token = plus?.webview.getWebviewById("wv").tokenScan; if (token) { - document.querySelector(".uni-page-head-hd").style.display = "none"; + const header = document.querySelector(".uni-page-head-hd"); + console.log("header", header); + if (header) { + header.style.display = "none"; + } } } state.id = options.id;