
+ v-if="appLogo" :src="appLogo"
+ alt="学校 Logo">
智慧工会
情系职工 · 真诚服务
@@ -423,18 +423,23 @@ const home = {
}).catch(() => "")
},
listHomeBrand() {
- const cached = this.readHomeCache("brand")
+ // 两处 Logo 共用 AppLogo 配置;独立缓存键避免读取此前误用的首页背景图缓存。
+ const cacheKey = "brandAppLogo"
+ const cached = this.readHomeCache(cacheKey)
if (cached) {
- this.appLogo = cached.appLogo || ""
- this.appName = cached.appName || ""
+ this.$set(this, "appLogo", cached.appLogo || "")
+ this.$set(this, "appName", cached.appName || "")
}
Promise.all([
this.getConfigValue("AppLogo"),
this.getConfigValue("AppName")
- ]).then(([appLogo, appName]) => {
- this.appLogo = appLogo
- this.appName = appName
- this.writeHomeCache("brand", { appLogo, appName }, this.homeCacheTtl.brand)
+ ]).then(([logoConfig, appName]) => {
+ // 配置支持逗号分隔多图;过滤空地址后取首图,空配置时不显示 Logo。
+ const images = this.parseBannerList(logoConfig)
+ const appLogo = images.length > 0 ? images[0].src : ""
+ this.$set(this, "appLogo", appLogo)
+ this.$set(this, "appName", appName)
+ this.writeHomeCache(cacheKey, { appLogo, appName }, this.homeCacheTtl.brand)
})
},
listRecommendApp() {
@@ -751,7 +756,6 @@ const home = {
height: 36px;
object-fit: contain;
object-position: left center;
- filter: brightness(0) invert(1);
}
.home-hero__title {