mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-09-13 14:57:16 +08:00
新增:新增修改基础信息 API(优化 Jackson 针对通用枚举接口 IEnum 的序列化和反序列化)
This commit is contained in:
@@ -38,7 +38,11 @@ axios.interceptors.request.use(
|
||||
// add response interceptors
|
||||
axios.interceptors.response.use(
|
||||
(response: AxiosResponse<HttpResponse>) => {
|
||||
return response.data;
|
||||
const res = response.data;
|
||||
if (!res.success) {
|
||||
Message.error(res.msg);
|
||||
}
|
||||
return res;
|
||||
},
|
||||
(error) => {
|
||||
const res = error.response.data;
|
||||
|
@@ -13,6 +13,10 @@ export function uploadAvatar(data: FormData) {
|
||||
return axios.post<AvatarRes>('/system/user/center/avatar', data);
|
||||
}
|
||||
|
||||
export function saveUserInfo() {
|
||||
return axios.get('/api/user/save-info');
|
||||
export interface UpdateBasicInfoReq {
|
||||
nickname: string;
|
||||
gender: number;
|
||||
}
|
||||
export function updateBasicInfo(req: UpdateBasicInfoReq) {
|
||||
return axios.patch('/system/user/center/basic/info', req);
|
||||
}
|
Reference in New Issue
Block a user