Browse Source

页面优化2

master
xuhuajiao 3 weeks ago
parent
commit
38abf02a5a
  1. 16
      src/views/newBookRecommend/index.vue
  2. 3
      src/views/video/index.vue

16
src/views/newBookRecommend/index.vue

@ -78,12 +78,12 @@ export default {
// rem1rem=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;
}
}
}

3
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('接口错误')
}

Loading…
Cancel
Save