主页新闻板块改成重庆工贸的;手机端主页背景logo改成读取系统参数里的logo,之前默认是地大logo
This commit is contained in:
@@ -39,7 +39,8 @@ const jcdt = {
|
||||
},
|
||||
methods: {
|
||||
onLink(item) {
|
||||
const url = this.isHttpOrHttps(item.href) ? item.href : "https://xgh.cug.edu.cn/" + item.href
|
||||
// 接口返回文章完整地址;相对地址按当前学校工会域名解析。
|
||||
const url = this.isHttpOrHttps(item.href) ? item.href : new URL(item.href, "https://gh.cqgmy.edu.cn/").href
|
||||
window.open(url)
|
||||
},
|
||||
isHttpOrHttps(url) {
|
||||
|
||||
@@ -3,8 +3,8 @@ const home = {
|
||||
<div class="home-page">
|
||||
<div class="home-summary-bar" :class="{'home-summary-bar--visible': showHomeSummary}">
|
||||
<img class="home-summary-bar__logo"
|
||||
src="/assets/mobile/img/home/v4/中国地质大学-logo.png"
|
||||
alt="中国地质大学">
|
||||
v-if="appLogo" :src="appLogo"
|
||||
alt="学校 Logo">
|
||||
<span class="home-summary-bar__divider"></span>
|
||||
<span class="home-summary-bar__title">智慧工会</span>
|
||||
</div>
|
||||
@@ -14,8 +14,8 @@ const home = {
|
||||
<div class="home-hero__content">
|
||||
<div class="home-hero__topbar">
|
||||
<img class="home-hero__brand-logo"
|
||||
src="/assets/mobile/img/home/v4/中国地质大学-logo.png"
|
||||
alt="中国地质大学">
|
||||
v-if="appLogo" :src="appLogo"
|
||||
alt="学校 Logo">
|
||||
</div>
|
||||
<div class="home-hero__title">智慧工会</div>
|
||||
<div class="home-hero__subtitle">情系职工 · 真诚服务</div>
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user