mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-11-04 22:57:12 +08:00
feat: 个人中心-安全设置,支持绑定、解绑三方账号
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import axios from 'axios';
|
||||
|
||||
const BASE_URL = '/system/user/center';
|
||||
const BASE_URL = '/system/user';
|
||||
|
||||
export interface BasicInfoModel {
|
||||
username: string;
|
||||
@@ -43,3 +43,20 @@ export interface UpdateEmailReq {
|
||||
export function updateEmail(req: UpdateEmailReq) {
|
||||
return axios.patch(`${BASE_URL}/email`, req);
|
||||
}
|
||||
|
||||
export interface UserSocialBindRecord {
|
||||
source: string;
|
||||
description: string;
|
||||
}
|
||||
|
||||
export function listSocial() {
|
||||
return axios.get<UserSocialBindRecord[]>(`${BASE_URL}/social`);
|
||||
}
|
||||
|
||||
export function bindSocial(source: string, req: any) {
|
||||
return axios.post(`${BASE_URL}/social/${source}`, req);
|
||||
}
|
||||
|
||||
export function unbindSocial(source: string) {
|
||||
return axios.delete(`${BASE_URL}/social/${source}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user