From a1d7e81859f554f3a53680cc35f0f49bf1f77098 Mon Sep 17 00:00:00 2001
From: wwf <1971391498@qq.com>
Date: 星期四, 14 五月 2026 14:37:02 +0800
Subject: [PATCH] 导入项目

---
 src/api/system/user/profile.ts |   57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 57 insertions(+), 0 deletions(-)

diff --git a/src/api/system/user/profile.ts b/src/api/system/user/profile.ts
new file mode 100644
index 0000000..7ac8df1
--- /dev/null
+++ b/src/api/system/user/profile.ts
@@ -0,0 +1,57 @@
+import request from '@/config/axios'
+
+export interface ProfileVO {
+  id: number
+  username: string
+  nickname: string
+  dept: {
+    id: number
+    name: string
+  }
+  roles: {
+    id: number
+    name: string
+  }[]
+  posts: {
+    id: number
+    name: string
+  }[]
+  email: string
+  mobile: string
+  sex: number
+  avatar: string
+  status: number
+  remark: string
+  loginIp: string
+  loginDate: Date
+  createTime: Date
+}
+
+export interface UserProfileUpdateReqVO {
+  nickname?: string
+  email?: string
+  mobile?: string
+  sex?: number
+  avatar?: string
+}
+
+// 鏌ヨ鐢ㄦ埛涓汉淇℃伅
+export const getUserProfile = () => {
+  return request.get({ url: '/system/user/profile/get' })
+}
+
+// 淇敼鐢ㄦ埛涓汉淇℃伅
+export const updateUserProfile = (data: UserProfileUpdateReqVO) => {
+  return request.put({ url: '/system/user/profile/update', data })
+}
+
+// 鐢ㄦ埛瀵嗙爜閲嶇疆
+export const updateUserPassword = (oldPassword: string, newPassword: string) => {
+  return request.put({
+    url: '/system/user/profile/update-password',
+    data: {
+      oldPassword: oldPassword,
+      newPassword: newPassword
+    }
+  })
+}

--
Gitblit v1.8.0