From 42ec27d6e7162db0fe7c6e657d7e26af9e502147 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Mon, 9 Sep 2024 10:44:11 +0800 Subject: [PATCH] fix --- src/components/menuTree/index.vue | 10 ++++++++++ src/layouts/home/index.vue | 21 ++++++++++++--------- src/pages/article/index.vue | 8 ++++++-- src/pages/column/index.vue | 2 +- src/pages/shop/show/index.vue | 2 +- 5 files changed, 30 insertions(+), 13 deletions(-) diff --git a/src/components/menuTree/index.vue b/src/components/menuTree/index.vue index 2a5c152..00aaa78 100644 --- a/src/components/menuTree/index.vue +++ b/src/components/menuTree/index.vue @@ -84,4 +84,14 @@ export default { } } } + +@media (max-width: 640px) { + .nav { + &>.menu-child { + &>.el-menu-item { + font-size: 1rem; + } + } + } +} diff --git a/src/layouts/home/index.vue b/src/layouts/home/index.vue index 39de21e..040e427 100644 --- a/src/layouts/home/index.vue +++ b/src/layouts/home/index.vue @@ -39,10 +39,18 @@ export default { this.$refs.header.showSearch = false } + this.getSeo() + }, + methods: { + ...mapMutations('content', [ + 'setSite' + ]), // seo信息 - this.$get(this.api.seoList, { - siteId: +this.$route.query.siteId || this.$store.state.content.site - }).then(({ data }) => { + async getSeo () { + const siteId = +this.$route.query.siteId || (location.href.includes('eduvessel') ? 7 : 1) + const { data } = await this.$get(this.api.seoList, { + siteId + }) if (data.length) { // favicon设置 if (data[0].iconUrl) { @@ -62,12 +70,7 @@ export default { document.querySelector('meta[name="description"]').setAttribute('content', data[0].description) document.querySelector('title').innerHTML = data[0].title } - }).catch(err => { }) - }, - methods: { - ...mapMutations('content', [ - 'setSite' - ]), + }, handleClass () { return this.enSite.includes(+this.$route.query.siteId || this.$store.state.content.site) }, diff --git a/src/pages/article/index.vue b/src/pages/article/index.vue index e932dab..0184e78 100644 --- a/src/pages/article/index.vue +++ b/src/pages/article/index.vue @@ -31,7 +31,7 @@ - + @@ -121,7 +121,7 @@ export default { this.$router.replace((temId === 25 ? '/article/activity' : '/publish/show') + path) } else { if (temId == 69) this.isParty = 1 // 组织架构(articleTemplate=69)是另一套主题,加个class即可 - if (temId == 72 || temId == 72) this.isPeople = 1 // 人物详情(articleTemplate=72或者80)要隐藏除了正文和摘要以外的所有字段 + if (temId == 72 || temId == 80) this.isPeople = 1 // 人物详情(articleTemplate=72或者80)要隐藏除了正文和摘要以外的所有字段 data.releaseTime = data.releaseTime.split(' ')[0] this.form = data // 手动修复tinymce缩进bug(p标签下包裹多个子元素,p标签上只有text-indent,没有font-size,导致缩进2em的情况下未能缩进两个字符) @@ -212,6 +212,10 @@ export default { .left { width: 76%; + + &:only-child { + width: 100%; + } } h2 { diff --git a/src/pages/column/index.vue b/src/pages/column/index.vue index b80b2c7..1e9fb21 100644 --- a/src/pages/column/index.vue +++ b/src/pages/column/index.vue @@ -613,7 +613,7 @@ export default { this.page = 1 const { typeId } = to; // 如果是左边的栏目,并且是第一级,并且长页/链接,则不作反应 - if (left && to.level === 1 && (typeId === 2 || typeId === 3)) return false; + if (left && (to.level === 1 && (typeId === 2 || typeId === 3) || to.menuVisible)) return false; // 出版物则跳转到出版物列表 if (to.templateId === 8) { this.$router.replace(`/publish?id=${this.id}&siteId=${this.site}`).catch(() => { }) diff --git a/src/pages/shop/show/index.vue b/src/pages/shop/show/index.vue index ef8b302..f0e4b35 100644 --- a/src/pages/shop/show/index.vue +++ b/src/pages/shop/show/index.vue @@ -389,7 +389,7 @@ export default { }, // 跳转详情 toDetail (id) { - this.$router.push(`/index/show?id=${id}`) + this.$router.push(`/shop/show?id=${id}`) this.id = id this.getData() },