feat: 移除合作伙伴模块并优化荣誉资质展示样式与名称显示
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -1884,6 +1884,8 @@
|
|||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
line-height: 1.8;
|
line-height: 1.8;
|
||||||
|
text-align: center;
|
||||||
|
/* 居中对齐 */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 网格布局容器 */
|
/* 网格布局容器 */
|
||||||
@@ -1896,6 +1898,8 @@
|
|||||||
padding: 0 20px;
|
padding: 0 20px;
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
|
justify-items: center;
|
||||||
|
/* 网格项居中对齐 */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 网格项样式 */
|
/* 网格项样式 */
|
||||||
@@ -1908,8 +1912,13 @@
|
|||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
width: 100%;
|
||||||
|
/* 占满网格单元 */
|
||||||
|
max-width: 220px;
|
||||||
|
/* 限制最大宽度 */
|
||||||
}
|
}
|
||||||
|
|
||||||
.honor-grid-item:hover {
|
.honor-grid-item:hover {
|
||||||
@@ -1920,16 +1929,38 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.honor-grid-item img {
|
.honor-grid-item img {
|
||||||
width: 100%;
|
width: auto;
|
||||||
|
/* 宽度自适应 */
|
||||||
|
max-width: 100%;
|
||||||
|
/* 不超过容器宽度 */
|
||||||
height: 180px;
|
height: 180px;
|
||||||
|
/* 固定高度 */
|
||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
|
/* 保持比例 */
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
|
margin-bottom: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.honor-grid-item:hover img {
|
.honor-grid-item:hover img {
|
||||||
transform: scale(1.05);
|
transform: scale(1.05);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 证书名称样式 */
|
||||||
|
.honor-grid-name {
|
||||||
|
font-size: 14px;
|
||||||
|
color: rgba(203, 213, 225, 0.9);
|
||||||
|
text-align: center;
|
||||||
|
margin: 0;
|
||||||
|
margin-top: 8px;
|
||||||
|
line-height: 1.4;
|
||||||
|
font-weight: 500;
|
||||||
|
transition: color 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.honor-grid-item:hover .honor-grid-name {
|
||||||
|
color: #38BDF8;
|
||||||
|
}
|
||||||
|
|
||||||
.honor-list {
|
.honor-list {
|
||||||
gap: 20px;
|
gap: 20px;
|
||||||
}
|
}
|
||||||
@@ -3005,12 +3036,18 @@ html {
|
|||||||
|
|
||||||
.honor-grid-item {
|
.honor-grid-item {
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.honor-grid-item img {
|
.honor-grid-item img {
|
||||||
height: 140px;
|
height: 140px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.honor-grid-name {
|
||||||
|
font-size: 13px;
|
||||||
|
margin-top: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
/* ===== 新闻区域 - 紧凑 ===== */
|
/* ===== 新闻区域 - 紧凑 ===== */
|
||||||
.section.news {
|
.section.news {
|
||||||
padding: 25px 0 !important;
|
padding: 25px 0 !important;
|
||||||
@@ -3410,12 +3447,18 @@ html {
|
|||||||
|
|
||||||
.honor-grid-item {
|
.honor-grid-item {
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.honor-grid-item img {
|
.honor-grid-item img {
|
||||||
height: 120px;
|
height: 120px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.honor-grid-name {
|
||||||
|
font-size: 12px;
|
||||||
|
margin-top: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
/* ===== 新闻 - 紧凑 ===== */
|
/* ===== 新闻 - 紧凑 ===== */
|
||||||
.section.news {
|
.section.news {
|
||||||
padding: 20px 0 !important;
|
padding: 20px 0 !important;
|
||||||
@@ -3958,12 +4001,18 @@ html {
|
|||||||
|
|
||||||
.honor-grid-item {
|
.honor-grid-item {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.honor-grid-item img {
|
.honor-grid-item img {
|
||||||
height: 100px;
|
height: 100px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.honor-grid-name {
|
||||||
|
font-size: 11px;
|
||||||
|
margin-top: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
/* ===== 新闻 - 极简 ===== */
|
/* ===== 新闻 - 极简 ===== */
|
||||||
.section.news {
|
.section.news {
|
||||||
padding: 18px 0 !important;
|
padding: 18px 0 !important;
|
||||||
|
|||||||
15
js/index.js
15
js/index.js
@@ -88,7 +88,6 @@ $(function () {
|
|||||||
function setIndexData(commentObj) {
|
function setIndexData(commentObj) {
|
||||||
// 清空容器,避免重复插入数据
|
// 清空容器,避免重复插入数据
|
||||||
$("#certBox").empty();
|
$("#certBox").empty();
|
||||||
$("#partnerBox").empty();
|
|
||||||
|
|
||||||
// 荣誉资质 - 网格布局
|
// 荣誉资质 - 网格布局
|
||||||
if (commentObj.honor && commentObj.honor.length > 0) {
|
if (commentObj.honor && commentObj.honor.length > 0) {
|
||||||
@@ -97,19 +96,7 @@ $(function () {
|
|||||||
$("#honorGrid").append(`
|
$("#honorGrid").append(`
|
||||||
<div class="honor-grid-item">
|
<div class="honor-grid-item">
|
||||||
<img src="${item.img}" alt="${item.name}" title="${item.name}">
|
<img src="${item.img}" alt="${item.name}" title="${item.name}">
|
||||||
</div>
|
<p class="honor-grid-name">${item.name}</p>
|
||||||
`);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
// 合作伙伴
|
|
||||||
if (commentObj.partner && commentObj.partner.length > 0) {
|
|
||||||
commentObj.partner.forEach((item) => {
|
|
||||||
$("#partnerBox").append(`
|
|
||||||
<div class="honor-item">
|
|
||||||
<div class="honor-icon">
|
|
||||||
<img src="${item.img}" alt="${item.name}">
|
|
||||||
</div>
|
|
||||||
<h4 class="honor-name">${item.name}</h4>
|
|
||||||
</div>
|
</div>
|
||||||
`);
|
`);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -286,43 +286,6 @@
|
|||||||
<t-button theme="primary" variant="outline" @click="addHonor">新增荣誉</t-button>
|
<t-button theme="primary" variant="outline" @click="addHonor">新增荣誉</t-button>
|
||||||
</t-card>
|
</t-card>
|
||||||
|
|
||||||
<t-card class="theme-card" title="合作伙伴" bordered>
|
|
||||||
<div v-if="!fullConfig.partner.length" class="empty-tip">
|
|
||||||
用于首页"合作伙伴"模块(partner)。
|
|
||||||
</div>
|
|
||||||
<div class="config-item" v-for="(item, index) in fullConfig.partner" :key="'partner-' + index">
|
|
||||||
<div class="config-item__header">
|
|
||||||
<h4>伙伴 {{ index + 1 }}</h4>
|
|
||||||
<t-button size="small" theme="danger" variant="outline" @click="removePartner(index)">
|
|
||||||
删除
|
|
||||||
</t-button>
|
|
||||||
</div>
|
|
||||||
<div class="form-grid">
|
|
||||||
<div class="form-item">
|
|
||||||
<label>名称</label>
|
|
||||||
<t-input v-model="item.name" placeholder="客户名称"></t-input>
|
|
||||||
</div>
|
|
||||||
<div class="form-item">
|
|
||||||
<label>描述</label>
|
|
||||||
<t-input v-model="item.description" placeholder="典型案例"></t-input>
|
|
||||||
</div>
|
|
||||||
<div class="form-item form-item--full">
|
|
||||||
<label>图片地址</label>
|
|
||||||
<div class="upload-row">
|
|
||||||
<t-input v-model="item.img" placeholder="/upload/case.png"></t-input>
|
|
||||||
<t-upload theme="custom" :action="uploadUrl" :headers="uploadHeaders"
|
|
||||||
:format-response="uploadFormatResponse" :show-upload-progress="false" :max="1"
|
|
||||||
@success="(ctx) => handleUpload(['partner', index, 'img'], ctx)">
|
|
||||||
<t-button size="small" class="ml-10">
|
|
||||||
<t-icon name="upload" size="small" /> 上传
|
|
||||||
</t-button>
|
|
||||||
</t-upload>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<t-button theme="primary" variant="outline" @click="addPartner">新增伙伴</t-button>
|
|
||||||
</t-card>
|
|
||||||
</t-tab-panel>
|
</t-tab-panel>
|
||||||
|
|
||||||
<t-tab-panel value="nav" label="导航配置">
|
<t-tab-panel value="nav" label="导航配置">
|
||||||
@@ -808,12 +771,6 @@
|
|||||||
removeHonor(index) {
|
removeHonor(index) {
|
||||||
this.fullConfig.honor.splice(index, 1);
|
this.fullConfig.honor.splice(index, 1);
|
||||||
},
|
},
|
||||||
addPartner() {
|
|
||||||
this.fullConfig.partner.push({ name: "", description: "", img: "" });
|
|
||||||
},
|
|
||||||
removePartner(index) {
|
|
||||||
this.fullConfig.partner.splice(index, 1);
|
|
||||||
},
|
|
||||||
addFeedbackType() {
|
addFeedbackType() {
|
||||||
if (!Array.isArray(this.fullConfig.feedback_type)) {
|
if (!Array.isArray(this.fullConfig.feedback_type)) {
|
||||||
this.fullConfig.feedback_type = [];
|
this.fullConfig.feedback_type = [];
|
||||||
|
|||||||
Reference in New Issue
Block a user