[AI Generated]: feat(*): 完善数据页切换成员、首页接口对接及我的页缓存信息展示
This commit is contained in:
@@ -54,7 +54,7 @@ const EMPTY_STATS: MeasureStatistics = {
|
||||
}
|
||||
|
||||
/** 从生日字符串(YYYY-MM-DD)计算周岁 */
|
||||
function calcAge(birthday: string): number {
|
||||
const calcAge = (birthday: string): number => {
|
||||
if (!birthday) return 0
|
||||
const [year, month, day] = birthday.split('-').map(Number)
|
||||
if (!year || !month || !day) return 0
|
||||
|
||||
Reference in New Issue
Block a user