feat: 改变了欢迎ip 的动态配置

This commit is contained in:
2026-01-16 11:28:55 +08:00
parent 17a05aab4c
commit 8211e0b91b
2 changed files with 37 additions and 31 deletions

View File

@@ -2,13 +2,9 @@ v
<template>
<view class="welcome-content border-box p-12">
<view class="wrap rounded-20">
<view
class="flex flex-items-center flex-justify-between border-box pl-12 pr-12"
>
<view class="flex flex-items-center flex-justify-between border-box pl-12 pr-12">
<view class="ip" :style="getStyle"></view>
<view
class="welcome-text font-size-14 font-500 font-family-misans-vf color-171717 line-height-24"
>
<view class="welcome-text font-size-14 font-500 font-family-misans-vf color-171717 line-height-24">
{{ welcomeContent }}
</view>
</view>
@@ -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);