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;