From ea22d49c6020a93ee409962d6fbe2402bc4337c0 Mon Sep 17 00:00:00 2001 From: xuminyui <576362016@qq.com> Date: Fri, 25 Oct 2024 14:47:33 +0800 Subject: [PATCH] fix --- src/pages/detail/index.vue | 9 ++++++--- src/pages/index/index.vue | 8 +++++--- src/pages/painting/index.vue | 8 +++++--- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/pages/detail/index.vue b/src/pages/detail/index.vue index e36e18b..29fb7d8 100644 --- a/src/pages/detail/index.vue +++ b/src/pages/detail/index.vue @@ -112,10 +112,13 @@ onShow(() => { }); }); onLoad((options) => { - const token = window?.plus?.storage.getItem("token"); - if (token) { - document.querySelector(".uni-page-head-hd").style.display = "none"; + if (window.plus) { + const token = plus?.webview.getWebviewById("wv").tokenScan; + if (token) { + document.querySelector(".uni-page-head-hd").style.display = "none"; + } } + state.id = options.id; state.pid = options.pid; state.boxRelBucketStatus = options.boxRelBucketStatus; diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index f8506dc..bb72b1f 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -162,9 +162,11 @@ const state = reactive({ searchValue: "", }); onLoad((options) => { - const token = window?.plus?.storage.getItem("token"); - if (token) { - document.querySelector(".uni-page-head-hd").style.display = "none"; + if (window.plus) { + const token = plus?.webview.getWebviewById("wv").tokenScan; + if (token) { + document.querySelector(".uni-page-head-hd").style.display = "none"; + } } state.id = options.id; state.pid = options.pid; diff --git a/src/pages/painting/index.vue b/src/pages/painting/index.vue index e4ec15b..abf7711 100644 --- a/src/pages/painting/index.vue +++ b/src/pages/painting/index.vue @@ -69,9 +69,11 @@ const state = reactive({ containerUid: "", }); onLoad((options) => { - const token = window?.plus?.storage.getItem("token"); - if (token) { - document.querySelector(".uni-page-head-hd").style.display = "none"; + if (window.plus) { + const token = plus?.webview.getWebviewById("wv").tokenScan; + if (token) { + document.querySelector(".uni-page-head-hd").style.display = "none"; + } } state.id = options.id; state.pid = options.pid;