From 8211e0b91b9e3fe5e32aa66082ff20ae19237cc5 Mon Sep 17 00:00:00 2001 From: zoujing Date: Fri, 16 Jan 2026 11:28:55 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=94=B9=E5=8F=98=E4=BA=86=E6=AC=A2?= =?UTF-8?q?=E8=BF=8Eip=20=E7=9A=84=E5=8A=A8=E6=80=81=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/chat/ChatTopNavBar/index.vue | 38 ++++++++++--------- .../components/chat/ChatTopWelcome/index.vue | 30 ++++++++------- 2 files changed, 37 insertions(+), 31 deletions(-) diff --git a/src/pages/index/components/chat/ChatTopNavBar/index.vue b/src/pages/index/components/chat/ChatTopNavBar/index.vue index 8c08e0c..99702df 100644 --- a/src/pages/index/components/chat/ChatTopNavBar/index.vue +++ b/src/pages/index/components/chat/ChatTopNavBar/index.vue @@ -5,18 +5,11 @@ - - + + {{ config.name }} @@ -32,22 +25,31 @@ import { getCurrentConfig } from "@/constant/base"; const props = defineProps({ mainPageDataModel: { type: Object, - default: () => ({}), + default: () => ({ + initPageImages: {}, + }), }, }); +const initPageImages = computed(() => { + return props.mainPageDataModel?.initPageImages || {}; +}); + const show = ref(false); const config = getCurrentConfig(); const getStyle = computed(() => { - return { - "--ipSmallImageStep": config.ipSmallImageStep, - "--ipSmallImageHeight": config.ipSmallImageHeight, - "--ipSmallTime": config.ipSmallTime, - backgroundImage: `url(${config.ipSmallImage})`, + const images = initPageImages.value; + const style = { + "--ipSmallImageStep": images.ipSmallImageStep ?? config.ipSmallImageStep, + "--ipSmallImageHeight": images.ipSmallImageHeight ?? config.ipSmallImageHeight, + "--ipSmallTime": images.ipSmallTime ?? config.ipSmallTime, + backgroundImage: `url(${images.ipSmallImage ?? config.ipSmallImage})`, backgroundRepeat: "no-repeat", backgroundSize: "32px auto", backgroundPosition: "0 0", }; + console.log("top nav bar image style:", style); + return style; }); const showDrawer = () => uni.$emit("SHOW_DRAWER"); diff --git a/src/pages/index/components/chat/ChatTopWelcome/index.vue b/src/pages/index/components/chat/ChatTopWelcome/index.vue index eecbfc8..7c03319 100644 --- a/src/pages/index/components/chat/ChatTopWelcome/index.vue +++ b/src/pages/index/components/chat/ChatTopWelcome/index.vue @@ -2,13 +2,9 @@ v