feat : 新增sm4加密
This commit is contained in:
@@ -5,6 +5,7 @@ export async function getCmsAppUserList(params?: API.MobileUser.ListParams) {
|
||||
return request<API.MobileUser.ListResult>(`/api/cms/appUser/list`, {
|
||||
method: 'GET',
|
||||
params: params,
|
||||
isEncrypt: true,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -4,11 +4,13 @@ export async function getResumeList(params?: API.AppUser.ListParams) {
|
||||
return request<API.AppUser.ResumePageResult>(`/api/cms/appUser/getResumeList`, {
|
||||
method: 'GET',
|
||||
params: params,
|
||||
isEncrypt: true,
|
||||
});
|
||||
}
|
||||
|
||||
export async function getResumeDetail(userId: string) {
|
||||
return request<API.AppUser.ResumeDetailResult>(`/api/cms/appUser/getResumeDetail/${userId}`, {
|
||||
method: 'GET',
|
||||
isEncrypt: true,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ export async function login(body: API.LoginParams, options?: Record<string, any>
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
data: body,
|
||||
isEncrypt: true,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -4,14 +4,18 @@ import { DataNode } from 'antd/es/tree';
|
||||
import { downLoadXlsx } from '@/utils/downloadfile';
|
||||
|
||||
// 查询用户信息列表
|
||||
export async function getUserList(params?: API.System.UserListParams, options?: { [key: string]: any }) {
|
||||
export async function getUserList(
|
||||
params?: API.System.UserListParams,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<API.System.UserPageResult>('/api/system/user/list', {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
},
|
||||
params,
|
||||
...(options || {})
|
||||
isEncrypt: true,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -19,7 +23,7 @@ export async function getUserList(params?: API.System.UserListParams, options?:
|
||||
export function getUser(userId: number, options?: { [key: string]: any }) {
|
||||
return request<API.System.UserInfoResult>(`/api/system/user/${userId}`, {
|
||||
method: 'GET',
|
||||
...(options || {})
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -31,7 +35,8 @@ export async function addUser(params: API.System.User, options?: { [key: string]
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
},
|
||||
data: params,
|
||||
...(options || {})
|
||||
isEncrypt: true,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -43,7 +48,7 @@ export async function updateUser(params: API.System.User, options?: { [key: stri
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
},
|
||||
data: params,
|
||||
...(options || {})
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -51,7 +56,7 @@ export async function updateUser(params: API.System.User, options?: { [key: stri
|
||||
export async function removeUser(ids: string, options?: { [key: string]: any }) {
|
||||
return request<API.Result>(`/api/system/user/${ids}`, {
|
||||
method: 'DELETE',
|
||||
...(options || {})
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -64,74 +69,73 @@ export function exportUser(params?: API.System.UserListParams, options?: { [key:
|
||||
export function changeUserStatus(userId: number, status: string) {
|
||||
const data = {
|
||||
userId,
|
||||
status
|
||||
}
|
||||
status,
|
||||
};
|
||||
return request<API.Result>('/api/system/user/changeStatus', {
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询用户个人信息
|
||||
export function getUserProfile() {
|
||||
return request('/api/system/user/profile', {
|
||||
method: 'get'
|
||||
})
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function updateUserProfile(data: API.CurrentUser) {
|
||||
return request<API.Result>('/api/system/user/profile', {
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 用户密码重置
|
||||
export function resetUserPwd(userId: number, password: string) {
|
||||
const data = {
|
||||
userId,
|
||||
password
|
||||
}
|
||||
password,
|
||||
};
|
||||
return request<API.Result>('/api/system/user/resetPwd', {
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 用户t个人密码重置
|
||||
export function updateUserPwd(oldPassword: string, newPassword: string) {
|
||||
const data = {
|
||||
oldPassword,
|
||||
newPassword
|
||||
}
|
||||
newPassword,
|
||||
};
|
||||
return request<API.Result>('/api/system/user/profile/updatePwd', {
|
||||
method: 'put',
|
||||
params: data
|
||||
})
|
||||
params: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 用户头像上传
|
||||
export function uploadAvatar(data: any) {
|
||||
return request('/api/system/user/profile/avatar', {
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 查询授权角色
|
||||
export function getAuthRole(userId: number) {
|
||||
return request('/system/user/authRole/' + userId, {
|
||||
method: 'get'
|
||||
})
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 保存授权角色
|
||||
export function updateAuthRole(data: Record<string, any>) {
|
||||
return request('/system/user/authRole', {
|
||||
method: 'put',
|
||||
params: data
|
||||
})
|
||||
params: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 获取数据列表
|
||||
|
||||
Reference in New Issue
Block a user