diff --git a/apps/web-antd/src/api/infra/job/index.ts b/apps/web-antd/src/api/infra/job/index.ts index 05f6a727..04848dd8 100644 --- a/apps/web-antd/src/api/infra/job/index.ts +++ b/apps/web-antd/src/api/infra/job/index.ts @@ -58,11 +58,12 @@ export function exportJob(params: any) { /** 任务状态修改 */ export function updateJobStatus(id: number, status: number) { - const params = { - id, - status, - }; - return requestClient.put('/infra/job/update-status', {}, { params }); + return requestClient.put('/infra/job/update-status', undefined, { + params: { + id, + status, + }, + }); } /** 定时任务立即执行一次 */ diff --git a/apps/web-antd/src/api/system/mail/template/index.ts b/apps/web-antd/src/api/system/mail/template/index.ts index ef08e248..9e2a5a78 100644 --- a/apps/web-antd/src/api/system/mail/template/index.ts +++ b/apps/web-antd/src/api/system/mail/template/index.ts @@ -58,7 +58,7 @@ export function deleteMailTemplate(id: number) { return requestClient.delete(`/system/mail-template/delete?id=${id}`); } -/** 批量删除邮件模板 */ +/** 批量删除邮件模版 */ export function deleteMailTemplateList(ids: number[]) { return requestClient.delete( `/system/mail-template/delete-list?ids=${ids.join(',')}`, diff --git a/apps/web-antd/src/api/system/oauth2/open/index.ts b/apps/web-antd/src/api/system/oauth2/open/index.ts index 591eaa75..16d9c7e6 100644 --- a/apps/web-antd/src/api/system/oauth2/open/index.ts +++ b/apps/web-antd/src/api/system/oauth2/open/index.ts @@ -3,7 +3,7 @@ import { requestClient } from '#/api/request'; /** OAuth2.0 授权信息响应 */ export namespace SystemOAuth2ClientApi { /** 授权信息 */ - export interface AuthorizeInfoResp { + export interface AuthorizeInfoRespVO { client: { logo: string; name: string; @@ -17,7 +17,7 @@ export namespace SystemOAuth2ClientApi { /** 获得授权信息 */ export function getAuthorize(clientId: string) { - return requestClient.get( + return requestClient.get( `/system/oauth2/authorize?clientId=${clientId}`, ); } diff --git a/apps/web-antd/src/api/system/oauth2/token/index.ts b/apps/web-antd/src/api/system/oauth2/token/index.ts index 9209fd71..bd369791 100644 --- a/apps/web-antd/src/api/system/oauth2/token/index.ts +++ b/apps/web-antd/src/api/system/oauth2/token/index.ts @@ -32,10 +32,3 @@ export function deleteOAuth2Token(accessToken: string) { `/system/oauth2-token/delete?accessToken=${accessToken}`, ); } - -/** 批量删除 OAuth2.0 令牌 */ -export function deleteOAuth2TokenList(accessTokens: string[]) { - return requestClient.delete( - `/system/oauth2-token/delete-list?accessTokens=${accessTokens.join(',')}`, - ); -} diff --git a/apps/web-antd/src/api/system/permission/index.ts b/apps/web-antd/src/api/system/permission/index.ts index 076dffc4..9039d9a0 100644 --- a/apps/web-antd/src/api/system/permission/index.ts +++ b/apps/web-antd/src/api/system/permission/index.ts @@ -2,19 +2,19 @@ import { requestClient } from '#/api/request'; export namespace SystemPermissionApi { /** 分配用户角色请求 */ - export interface AssignUserRoleReq { + export interface AssignUserRoleReqVO { userId: number; roleIds: number[]; } /** 分配角色菜单请求 */ - export interface AssignRoleMenuReq { + export interface AssignRoleMenuReqVO { roleId: number; menuIds: number[]; } /** 分配角色数据权限请求 */ - export interface AssignRoleDataScopeReq { + export interface AssignRoleDataScopeReqVO { roleId: number; dataScope: number; dataScopeDeptIds: number[]; @@ -30,14 +30,14 @@ export async function getRoleMenuList(roleId: number) { /** 赋予角色菜单权限 */ export async function assignRoleMenu( - data: SystemPermissionApi.AssignRoleMenuReq, + data: SystemPermissionApi.AssignRoleMenuReqVO, ) { return requestClient.post('/system/permission/assign-role-menu', data); } /** 赋予角色数据权限 */ export async function assignRoleDataScope( - data: SystemPermissionApi.AssignRoleDataScopeReq, + data: SystemPermissionApi.AssignRoleDataScopeReqVO, ) { return requestClient.post('/system/permission/assign-role-data-scope', data); } @@ -51,7 +51,7 @@ export async function getUserRoleList(userId: number) { /** 赋予用户角色 */ export async function assignUserRole( - data: SystemPermissionApi.AssignUserRoleReq, + data: SystemPermissionApi.AssignUserRoleReqVO, ) { return requestClient.post('/system/permission/assign-user-role', data); } diff --git a/apps/web-antd/src/api/system/social/user/index.ts b/apps/web-antd/src/api/system/social/user/index.ts index fd0316e8..b91f1506 100644 --- a/apps/web-antd/src/api/system/social/user/index.ts +++ b/apps/web-antd/src/api/system/social/user/index.ts @@ -20,14 +20,14 @@ export namespace SystemSocialUserApi { } /** 社交绑定请求 */ - export interface SocialUserBindReq { + export interface SocialUserBindReqVO { type: number; code: string; state: string; } /** 取消社交绑定请求 */ - export interface SocialUserUnbindReq { + export interface SocialUserUnbindReqVO { type: number; openid: string; } @@ -49,12 +49,12 @@ export function getSocialUser(id: number) { } /** 社交绑定,使用 code 授权码 */ -export function socialBind(data: SystemSocialUserApi.SocialUserBindReq) { +export function socialBind(data: SystemSocialUserApi.SocialUserBindReqVO) { return requestClient.post('/system/social-user/bind', data); } /** 取消社交绑定 */ -export function socialUnbind(data: SystemSocialUserApi.SocialUserUnbindReq) { +export function socialUnbind(data: SystemSocialUserApi.SocialUserUnbindReqVO) { return requestClient.delete('/system/social-user/unbind', { data }); } diff --git a/apps/web-antd/src/api/system/user/profile/index.ts b/apps/web-antd/src/api/system/user/profile/index.ts index b2c42bcc..97898e71 100644 --- a/apps/web-antd/src/api/system/user/profile/index.ts +++ b/apps/web-antd/src/api/system/user/profile/index.ts @@ -2,7 +2,7 @@ import { requestClient } from '#/api/request'; export namespace SystemUserProfileApi { /** 用户个人中心信息 */ - export interface UserProfileResp { + export interface UserProfileRespVO { id: number; username: string; nickname: string; @@ -19,13 +19,13 @@ export namespace SystemUserProfileApi { } /** 更新密码请求 */ - export interface UpdatePasswordReq { + export interface UpdatePasswordReqVO { oldPassword: string; newPassword: string; } /** 更新个人信息请求 */ - export interface UpdateProfileReq { + export interface UpdateProfileReqVO { nickname?: string; email?: string; mobile?: string; @@ -36,19 +36,21 @@ export namespace SystemUserProfileApi { /** 获取登录用户信息 */ export function getUserProfile() { - return requestClient.get( + return requestClient.get( '/system/user/profile/get', ); } /** 修改用户个人信息 */ -export function updateUserProfile(data: SystemUserProfileApi.UpdateProfileReq) { +export function updateUserProfile( + data: SystemUserProfileApi.UpdateProfileReqVO, +) { return requestClient.put('/system/user/profile/update', data); } /** 修改用户个人密码 */ export function updateUserPassword( - data: SystemUserProfileApi.UpdatePasswordReq, + data: SystemUserProfileApi.UpdatePasswordReqVO, ) { return requestClient.put('/system/user/profile/update-password', data); } diff --git a/apps/web-antd/src/views/_core/profile/index.vue b/apps/web-antd/src/views/_core/profile/index.vue index b061868f..8c803573 100644 --- a/apps/web-antd/src/views/_core/profile/index.vue +++ b/apps/web-antd/src/views/_core/profile/index.vue @@ -19,7 +19,7 @@ const authStore = useAuthStore(); const activeName = ref('basicInfo'); /** 加载个人信息 */ -const profile = ref(); +const profile = ref(); async function loadProfile() { profile.value = await getUserProfile(); } diff --git a/apps/web-antd/src/views/_core/profile/modules/base-info.vue b/apps/web-antd/src/views/_core/profile/modules/base-info.vue index abfb2668..d2d75903 100644 --- a/apps/web-antd/src/views/_core/profile/modules/base-info.vue +++ b/apps/web-antd/src/views/_core/profile/modules/base-info.vue @@ -15,7 +15,7 @@ import { useVbenForm, z } from '#/adapter/form'; import { updateUserProfile } from '#/api/system/user/profile'; const props = defineProps<{ - profile?: SystemUserProfileApi.UserProfileResp; + profile?: SystemUserProfileApi.UserProfileRespVO; }>(); const emit = defineEmits<{ (e: 'success'): void; @@ -78,7 +78,7 @@ async function handleSubmit(values: Recordable) { try { formApi.setLoading(true); // 提交表单 - await updateUserProfile(values as SystemUserProfileApi.UpdateProfileReq); + await updateUserProfile(values as SystemUserProfileApi.UpdateProfileReqVO); // 关闭并提示 emit('success'); message.success($t('ui.actionMessage.operationSuccess')); diff --git a/apps/web-antd/src/views/_core/profile/modules/profile-user.vue b/apps/web-antd/src/views/_core/profile/modules/profile-user.vue index dff3b4fb..57384e3e 100644 --- a/apps/web-antd/src/views/_core/profile/modules/profile-user.vue +++ b/apps/web-antd/src/views/_core/profile/modules/profile-user.vue @@ -14,7 +14,7 @@ import { CropperAvatar } from '#/components/cropper'; import { useUpload } from '#/components/upload/use-upload'; const props = defineProps<{ - profile?: SystemUserProfileApi.UserProfileResp; + profile?: SystemUserProfileApi.UserProfileRespVO; }>(); const emit = defineEmits<{ diff --git a/apps/web-ele/src/api/infra/job/index.ts b/apps/web-ele/src/api/infra/job/index.ts index fd337b46..04848dd8 100644 --- a/apps/web-ele/src/api/infra/job/index.ts +++ b/apps/web-ele/src/api/infra/job/index.ts @@ -58,11 +58,12 @@ export function exportJob(params: any) { /** 任务状态修改 */ export function updateJobStatus(id: number, status: number) { - const params = { - id, - status, - }; - return requestClient.put('/infra/job/update-status', { params }); + return requestClient.put('/infra/job/update-status', undefined, { + params: { + id, + status, + }, + }); } /** 定时任务立即执行一次 */ diff --git a/apps/web-ele/src/api/system/mail/log/index.ts b/apps/web-ele/src/api/system/mail/log/index.ts index 1ae06e35..c32b790e 100644 --- a/apps/web-ele/src/api/system/mail/log/index.ts +++ b/apps/web-ele/src/api/system/mail/log/index.ts @@ -34,15 +34,3 @@ export function getMailLogPage(params: PageParam) { { params }, ); } - -/** 查询邮件日志详情 */ -export function getMailLog(id: number) { - return requestClient.get( - `/system/mail-log/get?id=${id}`, - ); -} - -/** 重新发送邮件 */ -export function resendMail(id: number) { - return requestClient.put(`/system/mail-log/resend?id=${id}`); -}