From 38abf02a5a05cd9a166bd03268e13e7bc98194f1 Mon Sep 17 00:00:00 2001 From: xuhuajiao <13476289682@163.com> Date: Thu, 8 Jan 2026 16:18:55 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E4=BC=98=E5=8C=962?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/newBookRecommend/index.vue | 16 ++++++++++------ src/views/video/index.vue | 3 +-- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/views/newBookRecommend/index.vue b/src/views/newBookRecommend/index.vue index db0fcb4..c22a4d5 100644 --- a/src/views/newBookRecommend/index.vue +++ b/src/views/newBookRecommend/index.vue @@ -78,12 +78,12 @@ export default { // 容器高度(像素)转rem(假设1rem=80px,根据你的项目基准调整) const containerHeightRem = this.swiperHeight / 80 || 6.8125 // 封面宽度 = 容器高度的 20%(可根据需要调整比例) - const imgWidthRem = containerHeightRem * 0.22 + const imgWidthRem = containerHeightRem * 0.18 // 封面高度 = 宽度 × 1.34(图书封面标准比例 3:4 左右) const imgHeightRem = imgWidthRem * 1.34 // 文字区域字体大小 = 容器高度的 3.5% - const titleFontSize = containerHeightRem * 0.04 - const authorFontSize = containerHeightRem * 0.034 + const titleFontSize = containerHeightRem * 0.038 + const authorFontSize = containerHeightRem * 0.030 return { imgWidth: `${imgWidthRem}rem`, @@ -102,7 +102,10 @@ export default { spaceBetween: 0, height: this.swiperHeight || 540, // 使用动态高度,备用值540 loop: false, - autoplay: true, + autoplay: { + delay: 10000, + direction: 'down' + }, observer: true, observeParents: true, autoHeight: false, @@ -273,7 +276,7 @@ export default { display: flex; flex-direction: column; align-items: center; - justify-content: center; + justify-content: flex-start; padding: 0.1rem; &.empty-card { visibility: hidden; @@ -305,7 +308,7 @@ export default { font-weight: normal; display: -webkit-box; -webkit-box-orient: vertical; - -webkit-line-clamp: 1; + -webkit-line-clamp: 2; overflow: hidden; text-overflow: ellipsis; } @@ -318,6 +321,7 @@ export default { overflow: hidden; text-overflow: ellipsis; line-height: 1.2; + margin-top: 4px; } } } diff --git a/src/views/video/index.vue b/src/views/video/index.vue index d95ab31..4c76ae7 100644 --- a/src/views/video/index.vue +++ b/src/views/video/index.vue @@ -38,12 +38,11 @@ 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://', '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' - this.srcList = ['http://127.0.0.1:8888/uploadFile/9f904de6-0f5e-498e-8e5d-b7e14ea15496.mp4'] } else { this.$message.error('接口错误') }