diff --git a/client-configs.json b/client-configs.json
index 56ec9f1..36df720 100644
--- a/client-configs.json
+++ b/client-configs.json
@@ -5,7 +5,15 @@
"name": "智念",
"placeholder": "快告诉智念您在想什么~",
"loginDesc": "您好,欢迎来到智念科技",
- "logo": "https://oss.nianxx.cn/mp/static/version_101/login/dh_logo.png"
+ "logo": "https://oss.nianxx.cn/mp/static/version_101/login/dh_logo.png",
+ "ipLargeImage": "https://oss.nianxx.cn/mp/static/version_101/dh/dh_large.png",
+ "ipSmallImage": "https://oss.nianxx.cn/mp/static/version_101/dh/dh_small.png",
+ "ipLargeImageHeight": 19687,
+ "ipSmallImageHeight": 3744,
+ "ipLargeImageStep": 147,
+ "ipSmallImageStep": 117,
+ "ipLargeTime": 4,
+ "ipSmallTime": 4
},
"duohua": {
"clientId": "2",
@@ -13,7 +21,15 @@
"name": "朵朵",
"placeholder": "快告诉朵朵您在想什么~",
"loginDesc": "您好,欢迎来到朵花温泉",
- "logo": "https://oss.nianxx.cn/mp/static/version_101/login/dh_logo.png"
+ "logo": "https://oss.nianxx.cn/mp/static/version_101/login/dh_logo.png",
+ "ipLargeImage": "https://oss.nianxx.cn/mp/static/version_101/dh/dh_large.png",
+ "ipSmallImage": "https://oss.nianxx.cn/mp/static/version_101/dh/dh_small.png",
+ "ipLargeImageHeight": 19687,
+ "ipSmallImageHeight": 3744,
+ "ipLargeImageStep": 147,
+ "ipSmallImageStep": 117,
+ "ipLargeTime": 4,
+ "ipSmallTime": 4
},
"tianmu": {
"clientId": "4",
@@ -21,6 +37,14 @@
"name": "沐沐",
"placeholder": "快告诉沐沐您在想什么~",
"loginDesc": "您好,欢迎来到天沐温泉",
- "logo": "https://oss.nianxx.cn/mp/static/version_101/login/tm_logo.png"
+ "logo": "https://oss.nianxx.cn/mp/static/version_101/login/tm_logo.png",
+ "ipLargeImage": "https://oss.nianxx.cn/mp/static/version_101/tm/tm_large.png",
+ "ipSmallImage": "https://oss.nianxx.cn/mp/static/version_101/tm/tm_small.png",
+ "ipLargeImageHeight": 9514,
+ "ipSmallImageHeight": 4736,
+ "ipLargeImageStep": 71,
+ "ipSmallImageStep": 148,
+ "ipLargeTime": 4,
+ "ipSmallTime": 6
}
}
diff --git a/src/pages/index/components/chat/ChatTopNavBar/index.vue b/src/pages/index/components/chat/ChatTopNavBar/index.vue
index e48eb38..42cb1b1 100644
--- a/src/pages/index/components/chat/ChatTopNavBar/index.vue
+++ b/src/pages/index/components/chat/ChatTopNavBar/index.vue
@@ -7,7 +7,8 @@
import { ref, defineProps, computed, defineExpose } from "vue";
+import { getCurrentConfig } from "@/constant/base";
const props = defineProps({
mainPageDataModel: {
@@ -33,9 +35,19 @@ const props = defineProps({
const show = ref(false);
-const logoImageUrl = computed(
- () => props.mainPageDataModel.initPageImages?.logoImageUrl
-);
+const getStyle = computed(() => {
+ const config = getCurrentConfig();
+
+ return {
+ "--ipSmallImageStep": config.ipSmallImageStep,
+ "--ipSmallImageHeight": config.ipSmallImageHeight,
+ "--ipSmallTime": config.ipSmallTime,
+ backgroundImage: `url(${config.ipSmallImage})`,
+ backgroundRepeat: "no-repeat",
+ backgroundSize: "32px auto",
+ backgroundPosition: "0 0",
+ };
+});
const showDrawer = () => uni.$emit("SHOW_DRAWER");
diff --git a/src/pages/index/components/chat/ChatTopNavBar/styles/index.scss b/src/pages/index/components/chat/ChatTopNavBar/styles/index.scss
index 04e3e49..e11f0f7 100644
--- a/src/pages/index/components/chat/ChatTopNavBar/styles/index.scss
+++ b/src/pages/index/components/chat/ChatTopNavBar/styles/index.scss
@@ -1,13 +1,8 @@
-.ip {
- background-image: url("https://oss.nianxx.cn/mp/static/version_101/dh/dh_small.png");
- background-repeat: no-repeat;
- background-size: 32px auto;
- background-position: 0 0;
-}
-
// 图片从0%到100%动画
.image-animated {
- animation: logo-scale 0.3s ease-in-out, sprite-play 2s steps(117) infinite;
+ animation: logo-scale 0.3s ease-in-out,
+ sprite-play calc(var(--ipSmallTime) * 1s) steps(var(--ipSmallImageStep))
+ infinite;
}
@keyframes logo-scale {
@@ -26,7 +21,7 @@
100% {
/* 117 帧 × 每帧高度约 32px,终点应为 -(117-1)*32 = -5421px */
- background-position: 0 -3802px;
+ background-position: 0 calc(var(--ipSmallImageHeight) * -1px);
}
}
diff --git a/src/pages/index/components/chat/ChatTopWelcome/index.vue b/src/pages/index/components/chat/ChatTopWelcome/index.vue
index 286011b..eecbfc8 100644
--- a/src/pages/index/components/chat/ChatTopWelcome/index.vue
+++ b/src/pages/index/components/chat/ChatTopWelcome/index.vue
@@ -5,7 +5,7 @@ v
-
+
@@ -20,6 +20,7 @@ v