-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
393 additions
and
187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import http from '@/utils/http' | ||
import type * as System from '@/apis/system/type' | ||
|
||
const BASE_URL = '/system/user' | ||
|
||
/** @desc 修改用户基本信息 */ | ||
export function updateUserBaseInfo(data: { nickname: string; gender: number }) { | ||
return http.patch(`${BASE_URL}/basic/info`, data) | ||
} | ||
|
||
/** @desc 修改密码 */ | ||
export function updateUserPassword(data: { oldPassword: string; newPassword: string }) { | ||
return http.patch(`${BASE_URL}/password`, data) | ||
} | ||
|
||
/** @desc 修改手机号 */ | ||
export function updateUserPhone(data: { newPhone: string; captcha: string; currentPassword: string }) { | ||
return http.patch(`${BASE_URL}/phone`, data) | ||
} | ||
|
||
/** @desc 修改邮箱 */ | ||
export function updateUserEmail(data: { newEmail: string; captcha: string; currentPassword: string }) { | ||
return http.patch(`${BASE_URL}/email`, data) | ||
} | ||
|
||
/** @desc 获取绑定的三方账号 */ | ||
export function listUserSocial() { | ||
return http.get<System.BindSocialAccountRes[]>(`${BASE_URL}/social`) | ||
} | ||
|
||
/** @desc 绑定三方账号 */ | ||
export function bindSocialAccount(source: string, data: any) { | ||
return http.post(`${BASE_URL}/social/${source}`, data) | ||
} | ||
|
||
/** @desc 解绑三方账号 */ | ||
export function unbindSocialAccount(source: string) { | ||
return http.del(`${BASE_URL}/social/${source}`) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.