审核发送企业微信消息,首页优化

This commit is contained in:
2026-10-28 15:03:16 +08:00
parent 3059603186
commit 9c17925b60
17 changed files with 768 additions and 351 deletions
@@ -5,21 +5,22 @@ const workTemplate = {
<div class="work-template-title">
<i class="fa fa-clipboard"></i>
<span>工作模板</span>
<em>/Templates</em>
</div>
<button type="button" class="portal-more" @click="browseTemplates">更多模板 <i class="fa fa-arrow-right" aria-hidden="true"></i></button>
</div>
<div class="work-template-card">
<div v-if="templateList && templateList.length > 0" class="work-template-grid">
<div class="work-template-item"
<div ref="templateGrid" v-if="templateList && templateList.length > 0" class="work-template-grid">
<button type="button" class="work-template-item"
v-for="template in templateList"
:key="template.id"
@click="go(template)">
<div class="work-template-icon">
<img :src="template.templateIcon || template.cover || 'https://www.ncu.edu.cn/__local/8/52/2C/644986B4C9A030F7B65300178A6_8679CB08_18467.jpg'"
alt="">
<el-image :src="template.templateIcon || template.cover" fit="contain">
<i slot="error" class="fa fa-clipboard" aria-hidden="true"></i>
</el-image>
</div>
<div class="work-template-name">{{ template.templateName || template.name }}</div>
</div>
<div class="work-template-name" :title="template.templateName || template.name">{{ template.templateName || template.name }}</div>
</button>
</div>
<div v-else class="no-activity-placeholder">
@@ -28,6 +29,7 @@ const workTemplate = {
<p class="subtext">敬请关注后续更新</p>
</div>
</div>
<slot></slot>
</div>
`,
data() {
@@ -36,6 +38,15 @@ const workTemplate = {
}
},
methods: {
// 每次滚动一屏模板,到末尾后回到开头;无模板时不执行。
browseTemplates() {
const grid = this.$refs.templateGrid
if (!grid) return
// 模板仍使用全部真实数据,横向翻页不截断管理员可用的入口。
const atEnd = grid.scrollLeft + grid.clientWidth >= grid.scrollWidth - 2
grid.scrollTo({left: atEnd ? 0 : grid.scrollLeft + grid.clientWidth, behavior: 'smooth'})
},
// 无请求参数;Result.data 为当前管理员可用的工作模板数组。
listTemplate() {
this.$axios.post("/platform/home/listHomeTemplate").then((res) => {
if (res.code === 0) {