From e452965be2f291623b35eedfa0ed189fc21cab0a Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Wed, 27 Sep 2023 18:48:08 +0800 Subject: [PATCH] fix --- package-lock.json | 5 + package.json | 1 + src/components/rightColumns/index.vue | 80 ++++++++----- src/mixins/article/index.js | 1 + src/pages/column/index.vue | 160 +++++++++++++++++++------- src/pages/iasf/index.vue | 69 +++++++++-- 6 files changed, 241 insertions(+), 75 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8e08926..0b55790 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8308,6 +8308,11 @@ "integrity": "sha1-FC0RHzpuPa6PSpr9d9RYVbWpzOM=", "dev": true }, + "jquery": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz", + "integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==" + }, "js-base64": { "version": "2.6.4", "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz", diff --git a/package.json b/package.json index 839ecae..93a255d 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "element-theme": "^2.0.1", "element-ui": "^2.15.6", "html2canvas": "^1.3.2", + "jquery": "^3.7.1", "js-cookie": "^2.2.1", "jspdf": "^2.4.0", "lru-cache": "^7.14.1", diff --git a/src/components/rightColumns/index.vue b/src/components/rightColumns/index.vue index 47f20fd..9246613 100644 --- a/src/components/rightColumns/index.vue +++ b/src/components/rightColumns/index.vue @@ -9,27 +9,41 @@ node-key="id" @node-click="columnTo"> -

{{$t('column.hot')}}

- + + @@ -47,6 +61,7 @@ export default { label: 'columnName' }, news: [], + site2News: [], hots: [] } }, @@ -71,13 +86,24 @@ export default { this.hots = Util.removeTag(data) }).catch(err => { }) - this.$post(this.api.newlyPublishedArticles, { - pageNum: 1, - pageSize: 5, - siteId: this.site - }).then(({ data }) => { - this.news = Util.removeTag(data.records) - }).catch(res => { }) + if (this.site == 2) { + this.$post(this.api.newlyPublishedArticles, { + siteId: this.site, + columnIds: [411, 412, 413], + pageNum: 1, + pageSize: 8, + }).then(({ data }) => { + this.site2News = Util.removeTag(data.records); + }).catch((res) => { }); + } else { + this.$post(this.api.newlyPublishedArticles, { + pageNum: 1, + pageSize: 5, + siteId: this.site + }).then(({ data }) => { + this.news = Util.removeTag(data.records) + }).catch(res => { }) + } }, } } diff --git a/src/mixins/article/index.js b/src/mixins/article/index.js index 3315a1b..86415b1 100644 --- a/src/mixins/article/index.js +++ b/src/mixins/article/index.js @@ -56,6 +56,7 @@ export default { }, // 跳转文章页面 toArtice(item) { + if (item.listStyleId === 74) return false if (item.articleTemplate === 24) { // 链接 let href = item.linkAddress const cType = item.connectionType diff --git a/src/pages/column/index.vue b/src/pages/column/index.vue index adbf0da..e109d95 100644 --- a/src/pages/column/index.vue +++ b/src/pages/column/index.vue @@ -321,7 +321,7 @@ - - -
-

{{ $t('column.hot') }}

- - -

{{ $t('column.latestNews') }}

- -
+ @@ -449,6 +481,7 @@ export default { mixins: [mixins], data () { return { + Util, loaded: false, fromColumn: this.$route.query.column, columnId: '', @@ -469,7 +502,7 @@ export default { sameStyle: 1, allColumnId: [], showNav: false, - showNavIds: [10, 11, 12, 16, 55, 68, 73], // 显示侧导航的模板id + showNavIds: [10, 11, 12, 16, 55, 68, 73, 74], // 显示侧导航的模板id isFilter: false, page: 1, pageSize: 10, @@ -479,6 +512,7 @@ export default { value: 'id', label: 'columnName' }, + site2News: [], news: [], hots: [], deepestId: '', @@ -677,15 +711,24 @@ export default { }, // 最新资讯 getNews () { - this.$post(this.api.newlyPublishedArticles, { - pageNum: 1, - pageSize: 5, - siteId: this.site - }) - .then(({ data }) => { + if (this.site == 2) { + this.$post(this.api.newlyPublishedArticles, { + siteId: this.site, + columnIds: [411, 412, 413], + pageNum: 1, + pageSize: 10, + }).then(({ data }) => { + this.site2News = Util.removeTag(data.records); + }).catch((res) => { }); + } else { + this.$post(this.api.newlyPublishedArticles, { + pageNum: 1, + pageSize: 5, + siteId: this.site + }).then(({ data }) => { this.news = Util.removeTag(data.records); - }) - .catch((res) => { }); + }).catch((res) => { }); + } }, // 会议时间筛选回调 switchChange (item) { @@ -1121,6 +1164,43 @@ export default { height: auto; } } + .media { + display: flex; + flex-wrap: wrap; + margin-left: 10px; + li { + flex-direction: column; + width: calc(25% - 20px); + margin-right: 20px; + background-color: transparent; + &:nth-child(4n) { + margin-right: 0; + } + } + .media-video { + width: 100%; + height: 200px; + } + /deep/.media-pic { + width: 100%; + height: 200px; + // background-size: 100% auto; + background-position: center center; + background-repeat: no-repeat; + img { + opacity: 0; + } + } + .texts { + width: 100% !important; + padding-left: 0; + } + h6 { + margin-top: 10px; + margin-bottom: 0; + text-align: center; + } + } .news-notice { .releaseTime { width: 88px; @@ -1253,6 +1333,8 @@ export default { } .detail { flex: 1; + padding: 10px 15px; + background-color: #fff; h2 { margin-bottom: 1rem; font-size: 1.9rem; diff --git a/src/pages/iasf/index.vue b/src/pages/iasf/index.vue index 61045fc..2f5527f 100644 --- a/src/pages/iasf/index.vue +++ b/src/pages/iasf/index.vue @@ -1,6 +1,7 @@ -
-
+
+

{{ modules[1].form.title }}

10) { + if (this.lastScrollTop < scrollTop && !this.hide) { + // this.hide = true + // document.querySelector(`#part2`).scrollIntoView({ + // behavior: 'smooth' + // }) this.hide = true - } else if (this.lastScrollTop > scrollTop && scrollTop <= (window.innerWidth / 2.03)) { + setTimeout(() => { + $(window).scrollTop(100) + // window.scrollTo({ + // top: window.innerWidth / 2.03, + // behavior: 'smooth' // 平滑滚动 + // }); + // this.scrollTop(window.innerWidth / 2.03, 200) + }, 300) + + } else if (this.lastScrollTop > scrollTop && scrollTop == 0 && this.hide) { + // this.hide = false + // document.querySelector(`#part1`).scrollIntoView({ + // behavior: 'smooth' + // }) + // window.scrollTo({ + // top: 0, + // behavior: 'smooth' // 平滑滚动 + // }); this.hide = false + setTimeout(() => { + $(window).scrollTop(0) + // window.scrollTo({ + // top: 0, + // behavior: 'smooth' // 平滑滚动 + // }); + // this.scrollTop(0, 200) + }, 300) } this.lastScrollTop = scrollTop }, + scrollTop (number = 0, time) { + if (!time) { + document.body.scrollTop = document.documentElement.scrollTop = number; + return number; + } + const spacingTime = 20; // 设置循环的间隔时间 值越小消耗性能越高 + let spacingInex = time / spacingTime; // 计算循环的次数 + let nowTop = document.body.scrollTop + document.documentElement.scrollTop; // 获取当前滚动条位置 + let everTop = (number - nowTop) / spacingInex; // 计算每次滑动的距离 + let scrollTimer = setInterval(() => { + if (spacingInex > 0) { + spacingInex--; + this.scrollTop(nowTop += everTop); + } else { + clearInterval(scrollTimer); // 清除计时器 + } + }, spacingTime); + }, // 节流 throttle (fn, time) { // 上一次的执行时间 @@ -497,11 +545,11 @@ $bannerHeight: calc(100vw / 2.03); z-index: 2; position: relative; top: $bannerHeight; - padding-bottom: 229px; + padding: 6rem 0 229px; background-color: #fff; transition: all 0.7s cubic-bezier(0.5, 0, 0.2, 1) 0s; &.active { - top: 130px; + top: 106px; } } .block { @@ -521,6 +569,9 @@ $bannerHeight: calc(100vw / 2.03); .inner { width: 1200px; } +.card-block { + background: url(http://10.10.11.7/images/iasf/14.jpg) 0 0/100% 100% no-repeat; +} .card { display: flex; justify-content: space-between;