mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-09-24 20:57:16 +08:00
refactor: 账号管理功能大体完成,后续优化与细节调整
This commit is contained in:
@@ -54,5 +54,5 @@ export interface LoginResp {
|
||||
|
||||
// 第三方登录授权类型
|
||||
export interface SocialAuthAuthorizeResp {
|
||||
authorizeUrl: string;
|
||||
}
|
||||
authorizeUrl: string
|
||||
}
|
||||
|
@@ -7,3 +7,11 @@ const BASE_URL = '/captcha'
|
||||
export function getImageCaptcha() {
|
||||
return http.get<Common.ImageCaptchaResp>(`${BASE_URL}/img`)
|
||||
}
|
||||
/**@desc 获取手机验证码 */
|
||||
export function getPhoneCaptcha(query: { phone: string }) {
|
||||
return http.get<boolean>(`${BASE_URL}/sms`, query)
|
||||
}
|
||||
/**@desc 获取邮箱验证码 */
|
||||
export function getEmailCaptcha(query: { email: string }) {
|
||||
return http.get<boolean>(`${BASE_URL}/mail`, query)
|
||||
}
|
||||
|
@@ -222,3 +222,8 @@ export interface BasicConfigRecordResp {
|
||||
site_logo?: string
|
||||
site_favicon?: string
|
||||
}
|
||||
/** 绑定三方账号信息*/
|
||||
export interface BindSocialAccountRes {
|
||||
source: string
|
||||
description: string
|
||||
}
|
||||
|
@@ -37,3 +37,25 @@ export function exportUser(query: System.UserQuery) {
|
||||
export function resetUserPwd(data: any, id: string) {
|
||||
return http.patch(`${BASE_URL}/${id}/password`, data)
|
||||
}
|
||||
|
||||
/** @desc 修改用户基础信息 */
|
||||
export function updateUserBaseInfo(data: { nickname?: string; gender?: number }) {
|
||||
return http.patch(`${BASE_URL}/basic/info`, data)
|
||||
}
|
||||
|
||||
/** @desc 修改邮箱 */
|
||||
export function updateUserEmail(data: { newEmail: string; captcha: string; currentPassword: string }) {
|
||||
return http.patch(`${BASE_URL}/email`, data)
|
||||
}
|
||||
/**@desc 绑定三方账号 */
|
||||
export function bindSocialAccount(source: string, data: any) {
|
||||
return http.post(`${BASE_URL}/social/${source}`, data)
|
||||
}
|
||||
/**@desc 获取绑定的三方账号 */
|
||||
export function getSocialAccount() {
|
||||
return http.get<System.BindSocialAccountRes[]>(`${BASE_URL}/social`)
|
||||
}
|
||||
/**@desc 解绑三方账号 */
|
||||
export function unbindSocialAccount(source: string) {
|
||||
return http.del(`${BASE_URL}/social/${source}`)
|
||||
}
|
||||
|
Reference in New Issue
Block a user