From fe199c2863385b8186b29ab80d45a20f41a2d4c4 Mon Sep 17 00:00:00 2001 From: 79E <5980844@qq.com> Date: Mon, 29 May 2023 23:29:42 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E6=9B=B4=E6=96=B0=E7=AD=BE=E5=88=B0?= =?UTF-8?q?=E6=97=A5=E5=8E=86UI=E9=83=A8=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/user/index.module.less | 33 ++++++++++++++++++++++++++++---- src/pages/user/index.tsx | 11 +++++++---- 2 files changed, 36 insertions(+), 8 deletions(-) diff --git a/src/pages/user/index.module.less b/src/pages/user/index.module.less index 900f152..446655f 100644 --- a/src/pages/user/index.module.less +++ b/src/pages/user/index.module.less @@ -33,17 +33,42 @@ &_signin{ display: flex; flex-wrap: wrap; - gap:12px 20px; + gap: 12px 12px; &_item{ cursor: pointer; display: inline-block; - width: 40px; - height: 20px; + width: 44px; + height: 48px; border-radius: 4px; background-color: #eee; + border: 1px solid #c6c6c6; + position: relative; + + p:first-child{ + text-align: center; + font-size: 20px; + color: #c6c6c6; + line-height: 1.6; + font-weight: 500; + } + p:last-child{ + font-size: 12px; + border-top: 1px solid #c6c6c6; + text-align: center; + color: #c6c6c6; + } } &_selectTtem{ - background-color: #69b1ff; + background-color: #1677ffd9; + border-color: #1677ffd9; + p:first-child{ + color: #FFF; + } + p:last-child{ + border-top: 1px solid #f8f9fa; + text-align: center; + color: #f8f9fa; + } } } } \ No newline at end of file diff --git a/src/pages/user/index.tsx b/src/pages/user/index.tsx index 5ae3a07..03065b5 100644 --- a/src/pages/user/index.tsx +++ b/src/pages/user/index.tsx @@ -13,6 +13,8 @@ import { LockOutlined, MailOutlined } from '@ant-design/icons' import { fetchUserPassword } from '@/store/user/async' import { useNavigate } from 'react-router-dom' +const monthAbbreviations = ['JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN', 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC']; + function UserPage() { const navigate = useNavigate() const { token, user_info } = userStore() @@ -110,7 +112,7 @@ function UserPage() { )} {/* 签到区域 */}
-

签到日历

+

签到日历({formatTime('yyyy年MM月', new Date(monthDays[0]))})

{monthDays.map((item) => { @@ -118,9 +120,10 @@ function UserPage() { ? `${styles.userPage_signin_item} ${styles.userPage_signin_selectTtem}` : styles.userPage_signin_item return ( - - - +
+

{formatTime('dd', new Date(item)) === formatTime('dd') ? '今' : formatTime('dd', new Date(item))}

+

{monthAbbreviations[Number(formatTime('MM', new Date(item))) - 1]}

+
) })}