123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- 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
- }[]
- socialUsers: {
- type: number
- openid: string
- }[]
- email: string
- mobile: string
- sex: number
- avatar: string
- status: number
- remark: string
- loginIp: string
- loginDate: Date
- createTime: Date
- userNumber: string
- grade: string
- major: string
- supervisor: string
- masterType: string
- userType: string
- photoUrl: string
- }
- export interface UserProfileUpdateReqVO {
- nickname: string
- email: string
- mobile: string
- sex: number
- }
- // 查询用户个人信息
- export const getUserProfile = () => {
- return request.get({ url: '/system/user/profile/get' })
- }
- // const a = getUserProfile()
- // console.log('a',a);
- // 修改用户个人信息
- 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
- }
- })
- }
- // 用户头像上传
- export const uploadAvatar = (data) => {
- return request.upload({ url: '/system/user/profile/update-avatar', data: data })
- }
|