From 3401859db972e9656088c9e4be31cbf61cce611a Mon Sep 17 00:00:00 2001
From: liruiqiang <3151805288@qq.com>
Date: Thu, 21 Aug 2025 14:40:18 +0800
Subject: [PATCH] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=BF=A1=E6=81=AF=E6=B8=B2?=
=?UTF-8?q?=E6=9F=93=E4=B8=8E=E5=A4=B4=E5=83=8F=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages.json | 9 ++
src/pagesMember/profile/profile.vue | 257 ++++++++++++++++++++++++++++++++++++
src/services/profile.ts | 12 ++
src/types/member.d.ts | 22 ++-
4 files changed, 298 insertions(+), 2 deletions(-)
create mode 100644 src/pagesMember/profile/profile.vue
create mode 100644 src/services/profile.ts
diff --git a/src/pages.json b/src/pages.json
index bcd945d..a28244d 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -113,6 +113,15 @@
{
"navigationBarTitleText" : "设置"
}
+ },
+ {
+ "path" : "profile/profile",
+ "style" :
+ {
+ "navigationStyle": "custom",
+ "navigationBarTextStyle": "white",
+ "navigationBarTitleText" : "个人中心"
+ }
}
]
}
diff --git a/src/pagesMember/profile/profile.vue b/src/pagesMember/profile/profile.vue
new file mode 100644
index 0000000..f1c0a52
--- /dev/null
+++ b/src/pagesMember/profile/profile.vue
@@ -0,0 +1,257 @@
+
+
+
+
+
+ 个人信息
+
+
+
+
+
+ 点击修改头像
+
+
+
+
+
+
+
+ 账号
+ {{ profile?.account }}
+
+
+ 昵称
+
+
+
+ 性别
+
+
+
+
+
+
+ 生日
+
+ {{ profile?.birthday }}
+ 请选择日期
+
+
+
+
+
+ 城市
+
+ {{ profile?.fullLocation }}
+ 请选择城市
+
+
+
+
+ 职业
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/services/profile.ts b/src/services/profile.ts
new file mode 100644
index 0000000..eb224f0
--- /dev/null
+++ b/src/services/profile.ts
@@ -0,0 +1,12 @@
+import type { ProfileDetail } from '@/types/member'
+import { http } from '@/utils/http'
+
+/**
+ * 获取个人信息
+ */
+export const getMemberProfileAPI = () => {
+ return http({
+ method: 'GET',
+ url: '/member/profile',
+ })
+}
diff --git a/src/types/member.d.ts b/src/types/member.d.ts
index 05a7384..85dda74 100644
--- a/src/types/member.d.ts
+++ b/src/types/member.d.ts
@@ -1,5 +1,5 @@
-/** 小程序登录 登录用户信息 */
-export type LoginResult = {
+/** 封装通用信息 */
+type BaseProfile = {
/** 用户ID */
id: number
/** 头像 */
@@ -8,8 +8,26 @@ export type LoginResult = {
account: string
/** 昵称 */
nickname?: string
+}
+
+/** 小程序登录 登录用户信息 */
+export type LoginResult = BaseProfile & {
/** 手机号 */
mobile: string
/** 登录凭证 */
token: string
}
+
+/** 个人信息 用户详情信息 */
+export type ProfileDetail = BaseProfile & {
+ /** 性别 */
+ gender?: Gender
+ /** 生日 */
+ birthday?: string
+ /** 省市区 */
+ fullLocation?: string
+ /** 职业 */
+ profession?: string
+}
+/** 性别 */
+export type Gender = '女' | '男'