From f74ddf46ae518c02ebcb1900ca39e39f97b524af Mon Sep 17 00:00:00 2001 From: YunaiV Date: Tue, 21 Nov 2023 22:53:49 +0800 Subject: [PATCH 1/2] =?UTF-8?q?sms=EF=BC=9A=E7=A7=BB=E9=99=A4=20sendCode?= =?UTF-8?q?=E3=80=81sendMsg=20=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/sms/smsLog/index.ts | 2 -- src/views/system/sms/log/SmsLogDetail.vue | 3 --- 2 files changed, 5 deletions(-) diff --git a/src/api/system/sms/smsLog/index.ts b/src/api/system/sms/smsLog/index.ts index 3d54fac1..f9891716 100644 --- a/src/api/system/sms/smsLog/index.ts +++ b/src/api/system/sms/smsLog/index.ts @@ -15,8 +15,6 @@ export interface SmsLogVO { userType: number | null sendStatus: number | null sendTime: Date | null - sendCode: number | null - sendMsg: string apiSendCode: string apiSendMsg: string apiRequestId: string diff --git a/src/views/system/sms/log/SmsLogDetail.vue b/src/views/system/sms/log/SmsLogDetail.vue index 34c5e58e..b0d22c2d 100644 --- a/src/views/system/sms/log/SmsLogDetail.vue +++ b/src/views/system/sms/log/SmsLogDetail.vue @@ -37,9 +37,6 @@ {{ formatDate(detailData.sendTime) }} - - {{ detailData.sendCode }} | {{ detailData.sendMsg }} - {{ detailData.apiSendCode }} | {{ detailData.apiSendMsg }} From 1744c6ec6fea5897ee202d42c5e6198285ba09e4 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Fri, 24 Nov 2023 00:33:05 +0800 Subject: [PATCH 2/2] =?UTF-8?q?websocket=20=E9=87=8D=E6=96=B0=E5=B0=81?= =?UTF-8?q?=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.base | 4 +- src/api/system/notice/index.ts | 5 + src/locales/zh-CN.ts | 3 +- src/views/infra/webSocket/index.vue | 142 ++++++++++++++++++++-------- src/views/system/notice/index.vue | 14 +++ 5 files changed, 125 insertions(+), 43 deletions(-) diff --git a/.env.base b/.env.base index fdb26d85..cf433822 100644 --- a/.env.base +++ b/.env.base @@ -4,10 +4,10 @@ NODE_ENV=development VITE_DEV=true # 请求路径 -VITE_BASE_URL='http://localhost:48080' +VITE_BASE_URL='http://127.0.0.1:48080' # 上传路径 -VITE_UPLOAD_URL='http://localhost:48080/admin-api/infra/file/upload' +VITE_UPLOAD_URL='http://127.0.0.1:48080/admin-api/infra/file/upload' # 接口前缀 VITE_API_BASEPATH=/dev-api diff --git a/src/api/system/notice/index.ts b/src/api/system/notice/index.ts index 62bf5259..f6434697 100644 --- a/src/api/system/notice/index.ts +++ b/src/api/system/notice/index.ts @@ -35,3 +35,8 @@ export const updateNotice = (data: NoticeVO) => { export const deleteNotice = (id: number) => { return request.delete({ url: '/system/notice/delete?id=' + id }) } + +// 推送公告 +export const pushNotice = (id: number) => { + return request.post({ url: '/system/notice/push?id=' + id }) +} diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index 4f95852f..6346a3d3 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -437,5 +437,6 @@ export default { btn_zoom_in: '放大', btn_zoom_out: '缩小', preview: '预览' - } + }, + 'OAuth 2.0': 'OAuth 2.0' // 避免菜单名是 OAuth 2.0 时,一直 warn 报错 } diff --git a/src/views/infra/webSocket/index.vue b/src/views/infra/webSocket/index.vue index ce6db798..0f609213 100644 --- a/src/views/infra/webSocket/index.vue +++ b/src/views/infra/webSocket/index.vue @@ -1,5 +1,6 @@ @@ -168,6 +171,17 @@ const handleDelete = async (id: number) => { } catch {} } +/** 推送按钮操作 */ +const handlePush = async (id: number) => { + try { + // 推送的二次确认 + await message.confirm('是否推送所选中通知?') + // 发起推送 + await NoticeApi.pushNotice(id) + message.success(t('推送成功')) + } catch {} +} + /** 初始化 **/ onMounted(() => { getList()