From aeb6e1bbc5847b280fcf666c96f4faedb75e946c Mon Sep 17 00:00:00 2001 From: king <2229249788@qq.com> Date: Thu, 14 Sep 2023 11:41:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9ScrollView=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E5=92=8C=E9=9A=90=E8=97=8F=E6=BB=9A=E5=8A=A8=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/index.js | 2 +- .../lineChart/lineChart.module.scss | 30 +++++++++++++++++-- src/components/lineChart/lineChart.tsx | 13 ++++---- src/pages/manage/depAdmin/depAdmin.scss | 4 +-- src/pages/manage/userInfo/components/info.tsx | 15 +++++----- .../manage/userInfo/userInfo.module.scss | 19 ++++++++---- 6 files changed, 59 insertions(+), 24 deletions(-) diff --git a/config/index.js b/config/index.js index c6e3f18..9aac7d9 100644 --- a/config/index.js +++ b/config/index.js @@ -20,7 +20,7 @@ const config = { framework: 'react', compiler: 'webpack5', cache: { - enable: true // Webpack 持久化缓存配置,建议开启。默认配置请参考:https://docs.taro.zone/docs/config-detail#cache + enable: false // Webpack 持久化缓存配置,建议开启。默认配置请参考:https://docs.taro.zone/docs/config-detail#cache }, sass: {}, alias: { diff --git a/src/components/lineChart/lineChart.module.scss b/src/components/lineChart/lineChart.module.scss index 2eb264d..39e2808 100644 --- a/src/components/lineChart/lineChart.module.scss +++ b/src/components/lineChart/lineChart.module.scss @@ -3,8 +3,18 @@ align-items: flex-end; justify-content: left; flex-wrap: nowrap; - height: 400px; + height: 380px; position: relative; + padding-bottom: 10rpx; +} + +.overlay { + width: 100%; + height: 10rpx; + background: #fff; + position: absolute; + bottom: 0; + left: 0 } .empty { @@ -19,7 +29,7 @@ align-items: center; background: rgba(#fff, .9); - view{ + view { position: absolute; top: 0; bottom: 0; @@ -54,6 +64,22 @@ overflow: hidden; animation: rise 300ms ease-in-out forwards; max-height: 0; + margin-top: 10rpx; +} + +.value { + whiteSpace: nowrap; + font-size: 20rpx; + font-family: PingFang SC-Bold, PingFang SC; + font-weight: bold; + color: #606563; +} + +.time { + font-size: 20rpx; + font-family: PingFang SC-Bold, PingFang SC; + font-weight: bold; + color: #323635; } .line { diff --git a/src/components/lineChart/lineChart.tsx b/src/components/lineChart/lineChart.tsx index 31d8b2a..5262578 100644 --- a/src/components/lineChart/lineChart.tsx +++ b/src/components/lineChart/lineChart.tsx @@ -29,12 +29,12 @@ const LineChart: FC = ({data}) => { }, [data]) return ( - <> + {formatDateTime(new Date(maxHeight.time), 'MM月dd日')} {maxHeight.value > 0 ? `日最努力` : `期间没有学习记录`},学习了{formatTime(maxHeight.value, 0)} - + { !maxHeight.value && @@ -45,19 +45,20 @@ const LineChart: FC = ({data}) => { { !!maxHeight.value && lineChartList.map(d => - + { - d.value > 0 && {formatTime(d.value, 0)} + d.value > 0 && {formatTime(d.value, 0)} } - {d.time} + {d.time} ) } - + + ) } diff --git a/src/pages/manage/depAdmin/depAdmin.scss b/src/pages/manage/depAdmin/depAdmin.scss index a2608c4..0a3ddd5 100644 --- a/src/pages/manage/depAdmin/depAdmin.scss +++ b/src/pages/manage/depAdmin/depAdmin.scss @@ -3,7 +3,7 @@ background: white; min-height: calc(100vh - 20rpx - env(safe-area-inset-bottom)); box-sizing: border-box; - padding-bottom: calc(env(safe-area-inset-bottom) + 80rpx); + padding-bottom: calc(env(safe-area-inset-bottom) + 100rpx); } .operation { @@ -16,7 +16,7 @@ left: 0; .safeAreaInsetBottom { - height: 80rpx; + height: 100rpx; align-items: center; justify-content: space-around; padding-bottom: env(safe-area-inset-bottom); diff --git a/src/pages/manage/userInfo/components/info.tsx b/src/pages/manage/userInfo/components/info.tsx index 76ff19e..58bea64 100644 --- a/src/pages/manage/userInfo/components/info.tsx +++ b/src/pages/manage/userInfo/components/info.tsx @@ -14,16 +14,15 @@ const Info: FC = ({data}) => { <> - - + + {data?.name} - {data?.is_lock ? '禁用' : '正常'} - + - + {['学员', '管理员', '超级管理员'][data?.role_type || 0]} @@ -31,11 +30,11 @@ const Info: FC = ({data}) => { - 学员编号 + 学员编号 {data?.id}号 - 手机号 + 手机号 {data?.phone_number} diff --git a/src/pages/manage/userInfo/userInfo.module.scss b/src/pages/manage/userInfo/userInfo.module.scss index 3e29cd0..21426a2 100644 --- a/src/pages/manage/userInfo/userInfo.module.scss +++ b/src/pages/manage/userInfo/userInfo.module.scss @@ -10,6 +10,8 @@ align-items: center; box-sizing: border-box; line-height: 1.75; + color: #606563; + font-family: PingFang SC-Regular, PingFang SC; } .image { @@ -25,10 +27,14 @@ font-family: PingFang SC-Regular, PingFang SC; font-weight: 400; color: #FFFFFF; - margin-left: 20rpx; - padding: 3rpx 10rpx; + margin-left: 16rpx; border-radius: 8rpx; box-sizing: border-box; + height: 32rpx; + width: 60rpx; + display: inline-flex; + justify-content: center; + align-items: center; } .tag_muted { @@ -37,17 +43,20 @@ font-family: PingFang SC-Regular, PingFang SC; font-weight: 400; color: #FFFFFF; - margin-left: 20rpx; - padding: 3rpx 10rpx; + margin-left: 16rpx; border-radius: 8rpx; box-sizing: border-box; + height: 32rpx; + width: 60rpx; + display: inline-flex; + justify-content: center; + align-items: center; } .information { height: 96rpx; box-sizing: border-box; width: 100%; - color: #606563; padding: 20rpx 0; }