Browse Source

style(ui): 优化多个页面的UI样式和布局

- 调整按钮样式保持一致性
- 修改标签栏宽度为视窗单位
- 恢复书籍网格信息显示并优化图片模式
- 优化推荐项图片显示和高度设置
- 调整书籍页面图片显示模式和宽度设置
main
主管理员 1 week ago
parent
commit
3d13a89f45
4 changed files with 17 additions and 15 deletions
  1. +6
    -7
      pages/index/home.vue
  2. +8
    -6
      subPages/home/book.vue
  3. +2
    -1
      subPages/home/components/CustomTabbar.vue
  4. +1
    -1
      subPages/home/directory.vue

+ 6
- 7
pages/index/home.vue View File

@ -144,14 +144,14 @@
<view class="book-grid-cover">
<image :src="book.booksImg || '/static/default-image.png'" mode="aspectFill"></image>
</view>
<!-- <view class="book-grid-info">
<view class="book-grid-info">
<text class="book-grid-title">{{ book.booksName }}</text>
<view class="book-grid-meta">
<!-- <view class="book-grid-meta">
<text class="book-grid-grade">{{ book.categoryName }}/</text>
<image src="/static/play-icon.png" class="book-grid-duration-icon" />
<text class="book-grid-duration">{{ book.duration }}</text>
</view>
</view> -->
</view> -->
</view>
</view>
</view>
</view>
@ -165,7 +165,7 @@
:key="index"
class="recommend-item"
>
<image :src="item.img" mode="aspectFill" class="recommend-image"></image>
<image :src="item.img" mode="widthFix" class="recommend-image"></image>
</view>
</view>
</view>
@ -897,7 +897,6 @@ export default {
.recommend-item {
width: 100%;
height: 200rpx;
margin-bottom: 48rpx;
border-radius: 32rpx;
overflow: hidden;
@ -908,7 +907,7 @@ export default {
.recommend-image {
width: 100%;
height: 100%;
height: 200rpx;
}
}
}


+ 8
- 6
subPages/home/book.vue View File

@ -42,7 +42,7 @@
</view>
<view v-for="(item, itemIndex) in page" :key="itemIndex" class="text-content">
<image class="card-image" v-if="item && item.type === 'image'" :src="item.imageUrl"
mode="aspectFill"></image>
mode="widthFix"></image>
<!-- <view :class="['english-text-container', 'clickable-text', { 'lead-text': isCardTextHighlighted(page, itemIndex) }]" v-else-if="item && item.type === 'text' && item.language === 'en' && item.content" @click.stop="handleTextClick(item.content, item, index)" >
<text
v-for="(token, tokenIndex) in splitEnglishSentence(item.content)"
@ -1912,7 +1912,7 @@ export default {
.content-image {
width: 100%;
height: auto;
max-width: 600rpx;
//max-width: 600rpx;
/* 限制最大宽度,避免在大屏设备上过大 */
display: block;
border-radius: 12rpx;
@ -1921,9 +1921,9 @@ export default {
/* 添加阴影,增强层次感 */
/* 平板设备适配 */
@media screen and (min-width: 768px) {
max-width: 500rpx;
}
// @media screen and (min-width: 768px) {
// max-width: 500rpx;
// }
}
.video-content {
@ -1935,6 +1935,7 @@ export default {
.video-player {
// height: 100%;
width: 100%;
height: 60vw;
// margin: 0 auto;
// height: auto;
}
@ -1989,7 +1990,8 @@ export default {
}
.card-image {
width: 590rpx;
// width: 590rpx;
width: 100%;
height: 268rpx;
border-radius: 24rpx;
margin: 30rpx auto;


+ 2
- 1
subPages/home/components/CustomTabbar.vue View File

@ -213,7 +213,8 @@ export default {
align-items: center;
gap: 8rpx;
overflow-x: auto;
max-width: 400rpx;
// max-width: 400rpx;
max-width: 50vw;
&::-webkit-scrollbar {
display: none;


+ 1
- 1
subPages/home/directory.vue View File

@ -102,7 +102,7 @@
borderRadius: '198rpx',
background: '#06DADC',
fontSize: '28rpx',
fontWeight: '600'
fontWeight: '600',
}" >开始学习</uv-button>
</view>
<uv-safe-bottom></uv-safe-bottom>


Loading…
Cancel
Save