From 3c52a56c61f36684dd5256cf15a71b8505d4c8e9 Mon Sep 17 00:00:00 2001 From: xuhuajiao <13476289682@163.com> Date: Wed, 11 Feb 2026 17:00:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=AC=E5=91=8A=E9=9C=80=E6=B1=82=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/styles/index.scss | 46 ++++-- src/views/notice/index.vue | 225 +++++++++++++++++++--------- src/views/readStar/index-height.vue | 28 ++-- src/views/readStar/index.vue | 28 ++-- src/views/video/index.vue | 16 +- 5 files changed, 226 insertions(+), 117 deletions(-) diff --git a/src/assets/styles/index.scss b/src/assets/styles/index.scss index d958f1b..6164157 100644 --- a/src/assets/styles/index.scss +++ b/src/assets/styles/index.scss @@ -305,6 +305,40 @@ } } + // 通知公告 + // .notice{ + // .module-content{ + // display: flex; + // justify-content: space-between; + // width: 100%; + // padding: 0.25rem 0.375rem 0.5rem 0.375rem; + // .notice-icon-gif{ + // display: block; + // width: 2.375rem; + // height: 2.875rem; + // background: url('~@/assets/images/notice.gif') no-repeat left top; + // background-size: contain; + // margin-right: 0.15rem; + // } + // .seamless-warp{ + // width: calc(100vw); + // height: 3.1rem; + // overflow: hidden; + // .notice-txt { + // animation: myMove 20s linear infinite; + // animation-fill-mode: forwards; + // } + // @keyframes myMove { + // 0% { + // transform: translateY(2rem); + // } + // 100% { + // transform: translateY(-6rem); + // } + // } + // } + // } + // } // 通知公告 .notice{ .module-content{ @@ -324,18 +358,6 @@ width: calc(100vw); height: 3.1rem; overflow: hidden; - .notice-txt { - animation: myMove 20s linear infinite; - animation-fill-mode: forwards; - } - @keyframes myMove { - 0% { - transform: translateY(2rem); - } - 100% { - transform: translateY(-6rem); - } - } } } } diff --git a/src/views/notice/index.vue b/src/views/notice/index.vue index 062f12b..ebddc41 100644 --- a/src/views/notice/index.vue +++ b/src/views/notice/index.vue @@ -1,73 +1,152 @@ - - - - - + + + + + diff --git a/src/views/readStar/index-height.vue b/src/views/readStar/index-height.vue index d0f0d5d..181d933 100644 --- a/src/views/readStar/index-height.vue +++ b/src/views/readStar/index-height.vue @@ -128,19 +128,21 @@ export default { } FetchReadRanking(params).then(res => { - const result = JSON.parse(res.data) - - if (result.success && result.resultlist.length > 0) { - this.readstarList = result.resultlist.sort((a, b) => b.TOTALNUM - a.TOTALNUM).slice(0, 10) - // this.rankingDataComputed() - - // this.rankInterval = setInterval(() => { - // this.currentHover = (this.currentHover + 1) % this.rankingData.length - // }, 1000) - console.log('this.readstarList', this.readstarList) - this.getMondayDate() - } else { - throw new Error('Failed' + this.libcode) + if (res.data !== null) { + const result = JSON.parse(res.data) + + if (result.success && result.resultlist.length > 0) { + this.readstarList = result.resultlist.sort((a, b) => b.TOTALNUM - a.TOTALNUM).slice(0, 10) + // this.rankingDataComputed() + + // this.rankInterval = setInterval(() => { + // this.currentHover = (this.currentHover + 1) % this.rankingData.length + // }, 1000) + console.log('this.readstarList', this.readstarList) + this.getMondayDate() + } else { + throw new Error('Failed' + this.libcode) + } } }).catch(error => { console.error('Error', error) diff --git a/src/views/readStar/index.vue b/src/views/readStar/index.vue index 993d850..9eea198 100644 --- a/src/views/readStar/index.vue +++ b/src/views/readStar/index.vue @@ -85,19 +85,21 @@ export default { } FetchReadRanking(params).then(res => { - const result = JSON.parse(res.data) - - if (result.success && result.resultlist.length > 0) { - this.readstarList = result.resultlist.sort((a, b) => b.TOTALNUM - a.TOTALNUM).slice(0, 10) - // this.rankingDataComputed() - - // this.rankInterval = setInterval(() => { - // this.currentHover = (this.currentHover + 1) % this.rankingData.length - // }, 1000) - console.log('this.readstarList', this.readstarList) - this.getMondayDate() - } else { - throw new Error('Failed' + this.libcode) + if (res.data !== null) { + const result = JSON.parse(res.data) + + if (result.success && result.resultlist.length > 0) { + this.readstarList = result.resultlist.sort((a, b) => b.TOTALNUM - a.TOTALNUM).slice(0, 10) + // this.rankingDataComputed() + + // this.rankInterval = setInterval(() => { + // this.currentHover = (this.currentHover + 1) % this.rankingData.length + // }, 1000) + console.log('this.readstarList', this.readstarList) + this.getMondayDate() + } else { + throw new Error('Failed' + this.libcode) + } } }).catch(error => { console.error('Error', error) diff --git a/src/views/video/index.vue b/src/views/video/index.vue index 4c76ae7..4c9d118 100644 --- a/src/views/video/index.vue +++ b/src/views/video/index.vue @@ -37,12 +37,16 @@ export default { FetchShowFileList(params).then(res => { if (res.errCode === 0) { - // this.src = res.data[0].filePath.replace('D://', 'http://172.16.0.23:8888/') - this.srcList = res.data.map(x => x.filePath.replace('D://', 'http://172.22.0.23:8888/')) - // this.srcList = res.data.map(x => x.filePath.replace('D://uploadFile', 'http://localhost:8080/static/')) - // console.log(22222, this.srcList) - // this.src = 'D://uploadFile/11503339-b829-4357-8379-d2b49106431f.mp4'.replace('D://', 'http://127.0.0.1:8888/') - // this.src = 'http://127.0.0.1:8888/uploadFile/9f904de6-0f5e-498e-8e5d-b7e14ea15496.mp4' + if (res.data.length > 0) { + // this.src = res.data[0].filePath.replace('D://', 'http://172.16.0.23:8888/') + this.srcList = res.data.map(x => x.filePath.replace('D://', 'http://172.22.0.23:8888/')) + // this.srcList = res.data.map(x => x.filePath.replace('D://uploadFile', 'http://localhost:8080/static/')) + // console.log(22222, this.srcList) + // this.src = 'D://uploadFile/11503339-b829-4357-8379-d2b49106431f.mp4'.replace('D://', 'http://127.0.0.1:8888/') + // this.src = 'http://127.0.0.1:8888/uploadFile/9f904de6-0f5e-498e-8e5d-b7e14ea15496.mp4' + } else { + console.log('暂无视频资源') + } } else { this.$message.error('接口错误') }