主页新闻板块改成重庆工贸的;手机端主页背景logo改成读取系统参数里的logo,之前默认是地大logo

This commit is contained in:
2026-09-16 16:50:58 +08:00
parent 0cec79cd76
commit fc39bc8020
7 changed files with 135 additions and 54 deletions
+4 -4
View File
@@ -1,6 +1,6 @@
nutz:
application:
name: zhgh_cug_v4
name: zhgh_cqgmy
mvc:
ignore: ^(.+[.])(jsp|png|gif|jpg|js|css|jspx|jpeg|html|mp3|mp4|ico|svg|vue)$
exclusions: /favicon/*,/assets/*,/druid/*,/upload/*,/components/*
@@ -21,7 +21,7 @@ jetty:
#结合ftp使用,或用nginx代理ftp路径
#staticPath: /Users/wizzer/temp/files
#开发模式静态资源
staticPathLocal: D:/myProject/zhgh_cug_v4/src/main/resources/static
staticPathLocal: D:/myProject/zhgh_cqgmy/src/main/resources/static
security:
tokenName: saToken
@@ -71,7 +71,7 @@ redis:
#nodes=192.168.6.31:6377,192.168.6.31:6378,192.168.6.28:6377,192.168.6.28:6378,192.168.6.34:6377,192.168.6.34:6378
jdbc:
url: jdbc:mysql://192.168.21.215/zhgh_cug_v4?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
url: jdbc:mysql://192.168.21.215/zhgh_cqgmy?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
username: root
password: root
validationQuery: select 1
@@ -87,7 +87,7 @@ xsssql:
beetl:
RESOURCE:
#本地路径,开发时设置本地路径,便于调试
rootLocal: D:/myProject/zhgh_cug_v4/src/main/resources/views/
rootLocal: D:/myProject/zhgh_cqgmy/src/main/resources/views/
root: views/
DELIMITER_STATEMENT_START: "<!--#"
DELIMITER_STATEMENT_END: "#-->"
@@ -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 {