From f6bff8dbc5bfda08c21dfe2a14ecf62b62dc5230 Mon Sep 17 00:00:00 2001 From: ovo Date: Wed, 18 Dec 2024 17:43:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=97=A0=E7=94=A8=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- miniprogram/pages/index/index.wxml | 70 +----- miniprogram/pages/index/index.wxss | 336 +++-------------------------- 2 files changed, 41 insertions(+), 365 deletions(-) diff --git a/miniprogram/pages/index/index.wxml b/miniprogram/pages/index/index.wxml index 535e566..fd36b09 100644 --- a/miniprogram/pages/index/index.wxml +++ b/miniprogram/pages/index/index.wxml @@ -4,22 +4,10 @@ 阅读管理 - 设置 - - - - - - - - - 体验卡已过期 - - - - + + - - - 书架 - > - - - - - - 推荐 - 分类 - 排行 - 精品小说 - 文学 - - - - - - - - - - {{item.title}} - - {{item.author}} - 推荐值 {{item.rating}}% - - {{item.description}} - {{item.status}} - + + {{item.title}} + {{item.author}} + + + + + + diff --git a/miniprogram/pages/index/index.wxss b/miniprogram/pages/index/index.wxss index c0c7ce0..f17acac 100644 --- a/miniprogram/pages/index/index.wxss +++ b/miniprogram/pages/index/index.wxss @@ -1,206 +1,41 @@ /**index.wxss**/ page { - height: 100vh; - display: flex; - flex-direction: column; -} -.scrollarea { - flex: 1; - overflow-y: hidden; -} - -.userinfo { - display: flex; - flex-direction: column; - align-items: center; - color: #aaa; - width: 80%; -} - -.userinfo-avatar { - overflow: hidden; - width: 128rpx; - height: 128rpx; - margin: 20rpx; - border-radius: 50%; -} - -.usermotto { - margin-top: 200px; -} - -.avatar-wrapper { - padding: 0; - width: 56px !important; - border-radius: 8px; - margin-top: 40px; - margin-bottom: 40px; -} - -.avatar { - display: block; - width: 56px; - height: 56px; -} - -.nickname-wrapper { - display: flex; - width: 100%; - padding: 16px; - box-sizing: border-box; - border-top: .5px solid rgba(0, 0, 0, 0.1); - border-bottom: .5px solid rgba(0, 0, 0, 0.1); - color: black; -} - -.nickname-label { - width: 105px; -} - -.nickname-input { - flex: 1; -} - -.container { - min-height: 100vh; background: #f7f8fa; } -/* 顶部标题栏 */ +.container { + padding: 0 0 100rpx; +} + +/* 顶部标题 */ .header { - display: flex; - justify-content: space-between; - align-items: center; padding: 20rpx 30rpx; background: #fff; } .title { - font-size: 36rpx; + font-size: 34rpx; font-weight: bold; color: #333; } -.settings { - font-size: 28rpx; - color: #666; -} - -/* 搜索框 */ -.search-box { - margin: 20rpx 30rpx; - display: flex; - align-items: center; - background: #f2f3f5; - padding: 16rpx 24rpx; - border-radius: 32rpx; -} - -.search-input { - flex: 1; - margin-left: 16rpx; - font-size: 28rpx; -} - -.search-placeholder { - color: #999; -} - -/* 用户信息栏 */ -.user-bar { - padding: 20rpx 30rpx; - background: #fff; -} - -.status-text { - font-size: 32rpx; - color: #333; -} - -/* 书架预览 */ +/* 书籍列表 */ .book-list { - padding: 20rpx 30rpx; - white-space: nowrap; - background: #fff; - margin-top: 20rpx; + padding: 20rpx; } .book-item { - display: inline-block; - margin-right: 20rpx; -} - -.book-cover { - width: 180rpx; - height: 240rpx; - border-radius: 8rpx; - box-shadow: 0 4rpx 8rpx rgba(0,0,0,0.1); -} - -.book-more { - display: inline-flex; - flex-direction: column; - justify-content: center; - align-items: center; - width: 180rpx; - height: 240rpx; - background: #f7f8fa; - border-radius: 8rpx; - color: #666; - font-size: 28rpx; -} - -.arrow { - margin-top: 10rpx; - color: #999; -} - -/* 导航标签 */ -.nav-tabs { - display: flex; - white-space: nowrap; - background: #fff; - padding: 0 20rpx; - margin-top: 20rpx; -} - -.tab { - display: inline-block; - padding: 20rpx 30rpx; - font-size: 30rpx; - color: #666; - position: relative; -} - -.tab.active { - color: #333; - font-weight: bold; -} - -.tab.active::after { - content: ''; - position: absolute; - bottom: 0; - left: 50%; - transform: translateX(-50%); - width: 40rpx; - height: 6rpx; - background: #333; - border-radius: 3rpx; -} - -/* 内容区域 */ -.content .book-item { display: flex; padding: 20rpx; background: #fff; - margin-bottom: 20rpx; border-radius: 12rpx; + margin-bottom: 20rpx; } -.content .book-cover { - width: 160rpx; - height: 220rpx; +.book-cover { + width: 120rpx; + height: 160rpx; + border-radius: 8rpx; margin-right: 20rpx; } @@ -209,15 +44,11 @@ page { } .book-title { - font-size: 32rpx; + font-size: 30rpx; + font-weight: 500; color: #333; - margin-bottom: 10rpx; -} - -.book-meta { - display: flex; - justify-content: space-between; - margin-bottom: 10rpx; + margin-bottom: 8rpx; + display: block; } .book-author { @@ -225,127 +56,22 @@ page { color: #666; } -.book-rating { - font-size: 26rpx; - color: #ff9500; -} - -.book-desc { - font-size: 26rpx; - color: #999; - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-line-clamp: 2; - overflow: hidden; - margin-bottom: 10rpx; -} - -.book-status { - font-size: 24rpx; - color: #1989fa; -} - -.today-stats { +/* 添加按钮 */ +.add-btn { + position: fixed; + right: 40rpx; + bottom: 40rpx; + width: 100rpx; + height: 100rpx; + background: #1989fa; + border-radius: 50%; display: flex; - justify-content: space-around; - padding: 30rpx; - background: #fff; - border-radius: 12rpx; - margin-bottom: 30rpx; - box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.1); -} - -.stat-item { - display: flex; - flex-direction: column; align-items: center; + justify-content: center; + box-shadow: 0 4rpx 16rpx rgba(25, 137, 250, 0.3); } -.stat-value { - font-size: 40rpx; - font-weight: bold; - color: #1989fa; -} - -.stat-label { - font-size: 24rpx; - color: #666; - margin-top: 10rpx; -} - -.section { - background: #fff; - border-radius: 12rpx; - padding: 30rpx; - margin-bottom: 30rpx; - box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.1); -} - -.section-header { - display: flex; - justify-content: space-between; - align-items: center; - margin-bottom: 20rpx; -} - -.section-title { - font-size: 32rpx; - font-weight: bold; -} - -.more { - font-size: 24rpx; - color: #1989fa; -} - -.note-list { - margin-top: 20rpx; -} - -.note-item { - padding: 20rpx 0; - border-bottom: 1rpx solid #eee; -} - -.note-title { - font-size: 28rpx; - font-weight: bold; - color: #333; -} - -.note-content { - font-size: 24rpx; - color: #666; - margin: 10rpx 0; - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-line-clamp: 2; - overflow: hidden; -} - -.note-time { - font-size: 24rpx; - color: #999; -} - -.reading-goal { - background: #fff; - border-radius: 12rpx; - padding: 30rpx; - box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.1); -} - -.goal-title { - font-size: 32rpx; - font-weight: bold; - margin-bottom: 20rpx; - display: block; -} - -.goal-text { - font-size: 24rpx; - color: #666; - margin-top: 10rpx; - display: block; - text-align: center; +.add-icon { + color: #fff; + font-size: 60rpx; }