From 887c9087f1864e44b5ace24555083c1f202d0860 Mon Sep 17 00:00:00 2001 From: xuminyui <576362016@qq.com> Date: Mon, 21 Oct 2024 14:48:25 +0800 Subject: [PATCH] fix --- src/App.vue | 4 ---- src/pages/detail/index.vue | 4 ++++ src/pages/index/index.vue | 36 ++++++++++++++++++++++++++---------- src/pages/painting/index.vue | 4 ++++ 4 files changed, 34 insertions(+), 14 deletions(-) diff --git a/src/App.vue b/src/App.vue index fb9e0a6..4a409f7 100644 --- a/src/App.vue +++ b/src/App.vue @@ -3,10 +3,6 @@ export default { onLaunch: function () {}, onShow: function () { console.log("App Show"); - const token = window?.plus?.storage.getItem("token"); - if (token) { - document.querySelector(".uni-page-head-hd").style.display = "none"; - } }, onHide: function () { console.log("App Hide"); diff --git a/src/pages/detail/index.vue b/src/pages/detail/index.vue index be97fea..1d6609e 100644 --- a/src/pages/detail/index.vue +++ b/src/pages/detail/index.vue @@ -101,6 +101,10 @@ onShow(() => { }); }); onLoad((options) => { + const token = window?.plus?.storage.getItem("token"); + 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 82ed35a..4e74922 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -8,7 +8,7 @@ class="login-input" placeholder="画家姓名/画作名称" v-model="state.searchValue" - style="flex: 1; margin-right: 10rpx;height: 80rpx;" + style="flex: 1; margin-right: 10rpx; height: 80rpx" clearable > @@ -28,18 +28,31 @@ > - - - - 暂无画作 + + + + 暂无画作 - - @@ -111,7 +123,7 @@ import { closeWebview, hasPermission } from "../../../utils/index"; const { showMessage } = useToast(); const loading = ref(false); -const showNoResultImage = ref(false) +const showNoResultImage = ref(false); const isButtonDisabled = ref(false); const buttonText = ref("确认"); const state = reactive({ @@ -124,6 +136,10 @@ const state = reactive({ searchValue: "", }); onLoad((options) => { + const token = window?.plus?.storage.getItem("token"); + if (token) { + document.querySelector(".uni-page-head-hd").style.display = "none"; + } state.id = options.id; state.pid = options.pid; paintingList(); @@ -162,7 +178,7 @@ const paintingList = async (param) => { showNoResultImage.value = false; } else { state.tableData = []; - showNoResultImage.value = true; + showNoResultImage.value = true; showMessage({ type: "error", message: "查询失败,暂无画作!" }); } } else { diff --git a/src/pages/painting/index.vue b/src/pages/painting/index.vue index 538ea40..5813bb8 100644 --- a/src/pages/painting/index.vue +++ b/src/pages/painting/index.vue @@ -69,6 +69,10 @@ const state = reactive({ containerUid: "", }); onLoad((options) => { + const token = window?.plus?.storage.getItem("token"); + if (token) { + document.querySelector(".uni-page-head-hd").style.display = "none"; + } state.id = options.id; state.pid = options.pid; bindShelfHole();