diff --git a/src/apis/open/app.ts b/src/apis/open/app.ts index a5ec5fb..9e76d4f 100644 --- a/src/apis/open/app.ts +++ b/src/apis/open/app.ts @@ -27,7 +27,7 @@ export function updateApp(data: any, id: string) { /** @desc 删除应用 */ export function deleteApp(id: string) { - return http.del(`${BASE_URL}/${id}`) + return http.del(`${BASE_URL}`, { ids: [id] }) } /** @desc 导出应用 */ diff --git a/src/apis/system/client.ts b/src/apis/system/client.ts index a5ae56e..7094052 100644 --- a/src/apis/system/client.ts +++ b/src/apis/system/client.ts @@ -26,6 +26,6 @@ export function updateClient(data: any, id: string) { } /** @desc 删除终端 */ -export function deleteClient(ids: string | Array) { - return http.del(`${BASE_URL}/${ids}`) +export function deleteClient(id: string) { + return http.del(`${BASE_URL}`, { ids: [id] }) } diff --git a/src/apis/system/dept.ts b/src/apis/system/dept.ts index c591593..616773d 100644 --- a/src/apis/system/dept.ts +++ b/src/apis/system/dept.ts @@ -27,7 +27,7 @@ export function updateDept(data: any, id: string) { /** @desc 删除部门 */ export function deleteDept(id: string) { - return http.del(`${BASE_URL}/${id}`) + return http.del(`${BASE_URL}`, { ids: [id] }) } /** @desc 导出部门 */ diff --git a/src/apis/system/dict.ts b/src/apis/system/dict.ts index 08e418e..47592b2 100644 --- a/src/apis/system/dict.ts +++ b/src/apis/system/dict.ts @@ -27,7 +27,7 @@ export function updateDict(data: any, id: string) { /** @desc 删除字典 */ export function deleteDict(id: string) { - return http.del(`${BASE_URL}/${id}`) + return http.del(`${BASE_URL}`, { ids: [id] }) } /** @desc 清除字典缓存 */ @@ -57,5 +57,5 @@ export function updateDictItem(data: any, id: string) { /** @desc 删除字典项 */ export function deleteDictItem(id: string) { - return http.del(`${BASE_URL}/item/${id}`) + return http.del(`${BASE_URL}/item`, { ids: [id] }) } diff --git a/src/apis/system/file.ts b/src/apis/system/file.ts index d34a763..48fb434 100644 --- a/src/apis/system/file.ts +++ b/src/apis/system/file.ts @@ -16,8 +16,8 @@ export function updateFile(data: any, id: string) { } /** @desc 删除文件 */ -export function deleteFile(ids: string | Array) { - return http.del(`${BASE_URL}/${ids}`) +export function deleteFile(id: string) { + return http.del(`${BASE_URL}`, { ids: [id] }) } /** @desc 查询文件资源统计统计 */ diff --git a/src/apis/system/menu.ts b/src/apis/system/menu.ts index c5a0b09..e563485 100644 --- a/src/apis/system/menu.ts +++ b/src/apis/system/menu.ts @@ -27,7 +27,7 @@ export function updateMenu(data: any, id: string) { /** @desc 删除菜单 */ export function deleteMenu(id: string) { - return http.del(`${BASE_URL}/${id}`) + return http.del(`${BASE_URL}`, { ids: [id] }) } /** @desc 清除菜单缓存 */ diff --git a/src/apis/system/message.ts b/src/apis/system/message.ts index 0152a3e..c510ef2 100644 --- a/src/apis/system/message.ts +++ b/src/apis/system/message.ts @@ -11,13 +11,18 @@ export function listMessage(query: T.MessagePageQuery) { } /** @desc 删除消息 */ -export function deleteMessage(ids: string | Array) { - return http.del(`${BASE_URL}/${ids}`) +export function deleteMessage(ids: Array) { + return http.del(`${BASE_URL}`, { ids }) } /** @desc 标记已读 */ -export function readMessage(ids?: string | Array) { - return http.patch(`${BASE_URL}/read`, ids) +export function readMessage(ids?: Array) { + return http.patch(`${BASE_URL}/read`, { ids }) +} + +/** @desc 全部已读 */ +export function readAllMessage() { + return http.patch(`${BASE_URL}/readAll`) } /** @desc 查询未读消息数量 */ diff --git a/src/apis/system/notice.ts b/src/apis/system/notice.ts index cb100af..994cc18 100644 --- a/src/apis/system/notice.ts +++ b/src/apis/system/notice.ts @@ -26,6 +26,6 @@ export function updateNotice(data: any, id: string) { } /** @desc 删除公告 */ -export function deleteNotice(ids: string | Array) { - return http.del(`${BASE_URL}/${ids}`) +export function deleteNotice(id: string) { + return http.del(`${BASE_URL}`, { ids: [id] }) } diff --git a/src/apis/system/role.ts b/src/apis/system/role.ts index 35d7168..eaacade 100644 --- a/src/apis/system/role.ts +++ b/src/apis/system/role.ts @@ -26,8 +26,8 @@ export function updateRole(data: any, id: string) { } /** @desc 删除角色 */ -export function deleteRole(ids: string | Array) { - return http.del(`${BASE_URL}/${ids}`) +export function deleteRole(id: string) { + return http.del(`${BASE_URL}`, { ids: [id] }) } /** @desc 修改角色权限 */ diff --git a/src/apis/system/smsConfig.ts b/src/apis/system/smsConfig.ts index b09fb90..b74917d 100644 --- a/src/apis/system/smsConfig.ts +++ b/src/apis/system/smsConfig.ts @@ -27,5 +27,5 @@ export function updateSmsConfig(data: any, id: string) { /** @desc 删除短信配置 */ export function deleteSmsConfig(id: string) { - return http.del(`${BASE_URL}/${id}`) + return http.del(`${BASE_URL}`, { ids: [id] }) } diff --git a/src/apis/system/smsLog.ts b/src/apis/system/smsLog.ts index 56f42f9..62e63ba 100644 --- a/src/apis/system/smsLog.ts +++ b/src/apis/system/smsLog.ts @@ -17,7 +17,7 @@ export function getSmsLog(id: string) { /** @desc 删除短信日志 */ export function deleteSmsLog(id: string) { - return http.del(`${BASE_URL}/${id}`) + return http.del(`${BASE_URL}`, { ids: [id] }) } /** @desc 导出短信日志 */ diff --git a/src/apis/system/storage.ts b/src/apis/system/storage.ts index 7224272..22ab768 100644 --- a/src/apis/system/storage.ts +++ b/src/apis/system/storage.ts @@ -27,7 +27,7 @@ export function updateStorage(data: any, id: string) { /** @desc 删除存储 */ export function deleteStorage(id: string) { - return http.del(`${BASE_URL}/${id}`) + return http.del(`${BASE_URL}`, { ids: [id] }) } /** @desc 修改存储状态 */ diff --git a/src/apis/system/user.ts b/src/apis/system/user.ts index c8dd262..2f6637c 100644 --- a/src/apis/system/user.ts +++ b/src/apis/system/user.ts @@ -29,8 +29,8 @@ export function updateUser(data: any, id: string) { } /** @desc 删除用户 */ -export function deleteUser(ids: string | Array) { - return http.del(`${BASE_URL}/${ids}`) +export function deleteUser(id: string) { + return http.del(`${BASE_URL}`, { ids: [id] }) } /** @desc 导出用户 */ diff --git a/src/views/user/message/components/MyMessage.vue b/src/views/user/message/components/MyMessage.vue index 897b1d5..8e40eff 100644 --- a/src/views/user/message/components/MyMessage.vue +++ b/src/views/user/message/components/MyMessage.vue @@ -1,16 +1,16 @@