From 95773d1d73679b395f4ebed18dc171d676a07034 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Wed, 10 Jul 2024 14:34:46 +0800 Subject: [PATCH] fix --- src/App.vue | 3 ++- src/api/index.js | 3 ++- src/layouts/footer/index.vue | 2 +- src/layouts/header/index.vue | 12 +++++++++--- src/layouts/home/index.vue | 14 ++++++++++++++ src/layouts/navbar/index.vue | 2 +- src/mixins/article/index.js | 7 +++++-- src/mixins/page/index.js | 20 ++++++++++++++------ src/pages/article/index.vue | 11 +++++------ src/pages/course/index.vue | 4 ++-- src/pages/home/index.vue | 8 ++++++++ src/pages/index/list/index.vue | 4 ++-- src/store/modules/content.js | 6 +++++- 13 files changed, 70 insertions(+), 26 deletions(-) diff --git a/src/App.vue b/src/App.vue index 9fb7de9..3ac81a7 100644 --- a/src/App.vue +++ b/src/App.vue @@ -55,6 +55,7 @@ export default { }, 500) }, mounted () { + console.log(33, this.$route) window.onbeforeunload = function () { sessionStorage.removeItem('navPageSize') } @@ -82,7 +83,7 @@ export default { } } }, - setNav(num) { + setNav (num) { this.$store.commit('updateModelType', true) this.$store.dispatch('updateNavSumA', num) sessionStorage.setItem('navPageSize', num) diff --git a/src/api/index.js b/src/api/index.js index 8ac4e33..31924b8 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -29,12 +29,13 @@ export default { listMarketing: `/nakadai/nakadai/mall/marketing/promotion/pagingQueryList`, courseProduct: `/iasf/productDetails/courseProduct`, - categoryList: `/iasf/categoryService/Category/list`, foregroundPreview: `/iasf/productDetails/foregroundPreview`, + findCourse: `/iasf/productDetails/findById`, productDetailsPreview: `/iasf/productDetails/articlePreview`, courseDiscipline: `/iasf/subject/courseDiscipline`, courseProfessionalClass: `/iasf/subject/courseProfessionalClass`, courseProfessional: `/iasf/subject/courseProfessional`, + hasBeenCitedInTheArticle: `/iasf/categoryService/Category/hasBeenCitedInTheArticle`, // 产品中心 productCategoryList: `${host}/nakadai/productClassification/productCategoryList`, productTypeList: `${host}/nakadai/productType/productTypeList`, diff --git a/src/layouts/footer/index.vue b/src/layouts/footer/index.vue index 50a8ee1..ac03f76 100644 --- a/src/layouts/footer/index.vue +++ b/src/layouts/footer/index.vue @@ -477,7 +477,7 @@ export default { width: 100%; height: 100%; background: url(../../assets/images/footer-bg1.jpg) 0 0/cover no-repeat; - opacity: .3; + opacity: .2; } .inner { diff --git a/src/layouts/header/index.vue b/src/layouts/header/index.vue index 1d86f58..ced3f3e 100644 --- a/src/layouts/header/index.vue +++ b/src/layouts/header/index.vue @@ -12,7 +12,7 @@ @showMoreBtns="updateBtnsType">
-
+
{{ item.buttonText }}
@@ -32,8 +32,14 @@
+ - +
  • @@ -218,7 +224,7 @@ $height: 90px; &:not(.channel) { background-color: #fff; - border-bottom: 1px solid #f7f7f7; + border-bottom: 1px solid #f3f3f3; } &.estate { diff --git a/src/layouts/home/index.vue b/src/layouts/home/index.vue index 0650171..39de21e 100644 --- a/src/layouts/home/index.vue +++ b/src/layouts/home/index.vue @@ -44,6 +44,20 @@ export default { siteId: +this.$route.query.siteId || this.$store.state.content.site }).then(({ data }) => { if (data.length) { + // favicon设置 + if (data[0].iconUrl) { + const link = document.createElement('link') + link.rel = 'icon' + const name = data[0].iconSuffix.split('.').pop() + // 各个格式的图标需要给对应的typ + link.type = name === 'png' ? 'image/png' : + name === 'ico' ? 'image/x-icon' : + name === 'svg' ? 'image/svg+xml' + : 'image/jpeg' + link.href = data[0].iconUrl + document.head.appendChild(link) + } + document.querySelector('meta[name="keywords"]').setAttribute('content', data[0].keyword) document.querySelector('meta[name="description"]').setAttribute('content', data[0].description) document.querySelector('title').innerHTML = data[0].title diff --git a/src/layouts/navbar/index.vue b/src/layouts/navbar/index.vue index 28975c8..f2b2a44 100644 --- a/src/layouts/navbar/index.vue +++ b/src/layouts/navbar/index.vue @@ -157,7 +157,7 @@ export default {