diff --git a/frontend/ruoyi-ui/src/views/business/member/index.vue b/frontend/ruoyi-ui/src/views/business/member/index.vue
index ac9da8b..c877c17 100644
--- a/frontend/ruoyi-ui/src/views/business/member/index.vue
+++ b/frontend/ruoyi-ui/src/views/business/member/index.vue
@@ -67,7 +67,11 @@
{{ row.gender === '1' ? '男' : row.gender === '2' ? '女' : '未知' }}
-
+
+
+ {{ formatBirthday(row.birthday) }}
+
+
@@ -180,6 +184,22 @@ const formatRegisterSource = (source) => {
return map[source] || source
}
+// 格式化出生日期(只显示年月日)
+const formatBirthday = (birthday) => {
+ if (!birthday) return ''
+ // 如果已经是 YYYY-MM-DD 格式,直接返回前10位
+ if (typeof birthday === 'string' && birthday.length >= 10) {
+ return birthday.substring(0, 10)
+ }
+ // 如果是 Date 对象或时间戳
+ const d = new Date(birthday)
+ if (isNaN(d.getTime())) return birthday
+ const year = d.getFullYear()
+ const month = String(d.getMonth() + 1).padStart(2, '0')
+ const day = String(d.getDate()).padStart(2, '0')
+ return `${year}-${month}-${day}`
+}
+
// 获取会员列表
const getList = async () => {
loading.value = true