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
-
+
-
+
{{ welcomeContent }}
@@ -49,19 +45,27 @@ const props = defineProps({
},
});
-const getStyle = computed(() => {
- const config = getCurrentConfig();
+const initPageImages = computed(() => {
+ return props.mainPageDataModel?.initPageImages || {};
+});
- return {
- "--ipLargeImageStep": config.ipLargeImageStep,
- "--ipLargeImageHeight": config.ipLargeImageHeight,
- "--ipLargeTime": config.ipLargeTime,
- backgroundImage: `url(${config.ipLargeImage})`,
+const config = getCurrentConfig();
+
+const getStyle = computed(() => {
+ const images = initPageImages.value;
+ const style = {
+ "--ipLargeImageStep": images.ipLargeImageStep ?? config.ipLargeImageStep,
+ "--ipLargeImageHeight": images.ipLargeImageHeight ?? config.ipLargeImageHeight,
+ "--ipLargeTime": images.ipLargeTime ?? config.ipLargeTime,
+ backgroundImage: `url(${images.ipLargeImage || config.ipLargeImage})`,
backgroundRepeat: "no-repeat",
backgroundSize: "158px auto",
backgroundPosition: "0 0",
};
+ console.log("welcome image style:", style);
+ return style;
});
+
const welcomeContent = computed(() => props.mainPageDataModel.welcomeContent);
const guideWords = computed(() => props.mainPageDataModel.guideWords);