diff --git a/apps/web-antd/src/api/system/sms/channel/index.ts b/apps/web-antd/src/api/system/sms/channel/index.ts index e4ee25749..56890bea5 100644 --- a/apps/web-antd/src/api/system/sms/channel/index.ts +++ b/apps/web-antd/src/api/system/sms/channel/index.ts @@ -27,12 +27,16 @@ export function getSmsChannelPage(params: PageParam) { /** 获得短信渠道精简列表 */ export function getSimpleSmsChannelList() { - return requestClient.get('/system/sms-channel/simple-list'); + return requestClient.get( + '/system/sms-channel/simple-list', + ); } /** 查询短信渠道详情 */ export function getSmsChannel(id: number) { - return requestClient.get(`/system/sms-channel/get?id=${id}`); + return requestClient.get( + `/system/sms-channel/get?id=${id}`, + ); } /** 新增短信渠道 */ diff --git a/apps/web-antd/src/api/system/sms/log/index.ts b/apps/web-antd/src/api/system/sms/log/index.ts index cf0845800..8344f9932 100644 --- a/apps/web-antd/src/api/system/sms/log/index.ts +++ b/apps/web-antd/src/api/system/sms/log/index.ts @@ -4,7 +4,7 @@ import { requestClient } from '#/api/request'; export namespace SystemSmsLogApi { /** 短信日志信息 */ - export interface SmsLogVO { + export interface SmsLog { id?: number; channelId?: number; channelCode: string; @@ -18,22 +18,25 @@ export namespace SystemSmsLogApi { userId?: number; userType?: number; sendStatus?: number; - sendTime?: Date; + sendTime?: string; apiSendCode: string; apiSendMsg: string; apiRequestId: string; apiSerialNo: string; receiveStatus?: number; - receiveTime?: Date; + receiveTime?: string; apiReceiveCode: string; apiReceiveMsg: string; - createTime?: Date; + createTime: string; } } /** 查询短信日志列表 */ export function getSmsLogPage(params: PageParam) { - return requestClient.get>('/system/sms-log/page', { params }); + return requestClient.get>( + '/system/sms-log/page', + { params }, + ); } /** 导出短信日志 */ diff --git a/apps/web-antd/src/api/system/sms/template/index.ts b/apps/web-antd/src/api/system/sms/template/index.ts index 808d98e32..0ea7425a1 100644 --- a/apps/web-antd/src/api/system/sms/template/index.ts +++ b/apps/web-antd/src/api/system/sms/template/index.ts @@ -1,4 +1,4 @@ -import type { PageResult } from '@vben/request'; +import type { PageParam, PageResult } from '@vben/request'; import { requestClient } from '#/api/request'; @@ -20,7 +20,7 @@ export namespace SystemSmsTemplateApi { } /** 发送短信请求 */ - export interface SmsSendReqVO { + export interface SmsSendReq { mobile: string; templateCode: string; templateParams: Record; @@ -28,7 +28,7 @@ export namespace SystemSmsTemplateApi { } /** 查询短信模板列表 */ -export function getSmsTemplatePage(params: any) { +export function getSmsTemplatePage(params: PageParam) { return requestClient.get>( '/system/sms-template/page', { params }, @@ -37,7 +37,9 @@ export function getSmsTemplatePage(params: any) { /** 查询短信模板详情 */ export function getSmsTemplate(id: number) { - return requestClient.get(`/system/sms-template/get?id=${id}`); + return requestClient.get( + `/system/sms-template/get?id=${id}`, + ); } /** 新增短信模板 */ @@ -57,10 +59,12 @@ export function deleteSmsTemplate(id: number) { /** 导出短信模板 */ export function exportSmsTemplate(params: any) { - return requestClient.download('/system/sms-template/export-excel', { params }); + return requestClient.download('/system/sms-template/export-excel', { + params, + }); } /** 发送短信 */ -export function sendSms(data: SystemSmsTemplateApi.SmsSendReqVO) { +export function sendSms(data: SystemSmsTemplateApi.SmsSendReq) { return requestClient.post('/system/sms-template/send-sms', data); } diff --git a/apps/web-antd/src/views/system/sms/log/data.ts b/apps/web-antd/src/views/system/sms/log/data.ts index 76a24000c..019b04dee 100644 --- a/apps/web-antd/src/views/system/sms/log/data.ts +++ b/apps/web-antd/src/views/system/sms/log/data.ts @@ -15,7 +15,7 @@ export function useGridFormSchema(): VbenFormSchema[] { componentProps: { allowClear: true, placeholder: '请输入手机号', - } + }, }, { fieldName: 'channelId', @@ -36,7 +36,7 @@ export function useGridFormSchema(): VbenFormSchema[] { componentProps: { allowClear: true, placeholder: '请输入模板编号', - } + }, }, { fieldName: 'sendStatus', @@ -80,7 +80,7 @@ export function useGridFormSchema(): VbenFormSchema[] { } /** 列表的字段 */ -export function useGridColumns( +export function useGridColumns( onActionClick: OnActionClickFn, ): VxeTableGridOptions['columns'] { return [ diff --git a/apps/web-antd/src/views/system/sms/log/index.vue b/apps/web-antd/src/views/system/sms/log/index.vue index 247539578..2a4f58c22 100644 --- a/apps/web-antd/src/views/system/sms/log/index.vue +++ b/apps/web-antd/src/views/system/sms/log/index.vue @@ -1,18 +1,22 @@ diff --git a/apps/web-antd/src/views/system/sms/log/modules/form.vue b/apps/web-antd/src/views/system/sms/log/modules/form.vue index 61ec2abd2..3fdae816d 100644 --- a/apps/web-antd/src/views/system/sms/log/modules/form.vue +++ b/apps/web-antd/src/views/system/sms/log/modules/form.vue @@ -1,11 +1,16 @@ - - - diff --git a/apps/web-antd/src/views/system/sms/template/data.ts b/apps/web-antd/src/views/system/sms/template/data.ts index 4725db770..4bf751a5f 100644 --- a/apps/web-antd/src/views/system/sms/template/data.ts +++ b/apps/web-antd/src/views/system/sms/template/data.ts @@ -95,7 +95,7 @@ export function useFormSchema(): VbenFormSchema[] { component: 'Textarea', componentProps: { placeholder: '请输入备注', - } + }, }, ]; } @@ -130,7 +130,7 @@ export function useGridFormSchema(): VbenFormSchema[] { componentProps: { allowClear: true, placeholder: '请输入模板编码', - } + }, }, { fieldName: 'name', @@ -139,7 +139,7 @@ export function useGridFormSchema(): VbenFormSchema[] { componentProps: { allowClear: true, placeholder: '请输入模板名称', - } + }, }, { fieldName: 'channelId', @@ -168,6 +168,14 @@ export function useGridFormSchema(): VbenFormSchema[] { /** 发送短信表单 */ export function useSendSmsFormSchema(): VbenFormSchema[] { return [ + { + fieldName: 'content', + label: '模板内容', + component: 'Textarea', + componentProps: { + disabled: true, + }, + }, { fieldName: 'mobile', label: '手机号码', diff --git a/apps/web-antd/src/views/system/sms/template/modules/send-form.vue b/apps/web-antd/src/views/system/sms/template/modules/send-form.vue index 0f67bb6a9..d31d1edee 100644 --- a/apps/web-antd/src/views/system/sms/template/modules/send-form.vue +++ b/apps/web-antd/src/views/system/sms/template/modules/send-form.vue @@ -1,10 +1,12 @@