diff --git a/src/apis/system/index.ts b/src/apis/system/index.ts index bbf216d..a1713ba 100644 --- a/src/apis/system/index.ts +++ b/src/apis/system/index.ts @@ -7,5 +7,7 @@ export * from './dict' export * from './file' export * from './storage' export * from './option' +export * from './smsConfig' +export * from './smsLog' export * from './user-center' export * from './message' diff --git a/src/apis/system/smsConfig.ts b/src/apis/system/smsConfig.ts index b19125b..b09fb90 100644 --- a/src/apis/system/smsConfig.ts +++ b/src/apis/system/smsConfig.ts @@ -1,87 +1,31 @@ +import type * as T from './type' import http from '@/utils/http' +export type * from './type' + const BASE_URL = '/system/smsConfig' -export interface SmsConfigResp { - id: string - name: string - supplier: string - accessKeyId: string - accessKeySecret: string - signature: string - templateId: string - weight: string - retryInterval: string - maxRetries: string - maximum: string - supplierConfig: string - isEnable: string - createUser: string - createTime: string - updateUser: string - updateTime: string - createUserString: string - updateUserString: string - disabled: boolean -} -export interface SmsConfigDetailResp { - id: string - name: string - supplier: string - accessKeyId: string - accessKeySecret: string - signature: string - templateId: string - weight: string - retryInterval: string - maxRetries: string - maximum: string - supplierConfig: string - isEnable: string - createUser: string - createTime: string - updateUser: string - updateTime: string - createUserString: string - updateUserString: string -} -export interface SmsConfigQuery { - name: string | undefined - supplier: string | undefined - accessKeyId: string | undefined - signature: string | undefined - templateId: string | undefined - isEnable: string | undefined - sort: Array -} -export interface SmsConfigPageQuery extends SmsConfigQuery, PageQuery {} - -/** @desc 查询短信服务配置列表 */ -export function listSmsConfig(query: SmsConfigPageQuery) { - return http.get>(`${BASE_URL}`, query) +/** @desc 查询短信配置列表 */ +export function listSmsConfig(query: T.SmsConfigPageQuery) { + return http.get>(`${BASE_URL}`, query) } -/** @desc 查询短信服务配置详情 */ +/** @desc 查询短信配置详情 */ export function getSmsConfig(id: string) { - return http.get(`${BASE_URL}/${id}`) + return http.get(`${BASE_URL}/${id}`) } -/** @desc 新增短信服务配置 */ +/** @desc 新增短信配置 */ export function addSmsConfig(data: any) { return http.post(`${BASE_URL}`, data) } -/** @desc 修改短信服务配置 */ +/** @desc 修改短信配置 */ export function updateSmsConfig(data: any, id: string) { return http.put(`${BASE_URL}/${id}`, data) } -/** @desc 删除短信服务配置 */ +/** @desc 删除短信配置 */ export function deleteSmsConfig(id: string) { return http.del(`${BASE_URL}/${id}`) } - -/** @desc 导出短信服务配置 */ -export function exportSmsConfig(query: SmsConfigQuery) { - return http.download(`${BASE_URL}/export`, query) -} diff --git a/src/apis/system/smsLog.ts b/src/apis/system/smsLog.ts new file mode 100644 index 0000000..56f42f9 --- /dev/null +++ b/src/apis/system/smsLog.ts @@ -0,0 +1,26 @@ +import type * as T from './type' +import http from '@/utils/http' + +export type * from './type' + +const BASE_URL = '/system/smsLog' + +/** @desc 查询短信日志列表 */ +export function listSmsLog(query: T.SmsLogPageQuery) { + return http.get>(`${BASE_URL}`, query) +} + +/** @desc 查询短信日志详情 */ +export function getSmsLog(id: string) { + return http.get(`${BASE_URL}/${id}`) +} + +/** @desc 删除短信日志 */ +export function deleteSmsLog(id: string) { + return http.del(`${BASE_URL}/${id}`) +} + +/** @desc 导出短信日志 */ +export function exportSmsLog(query: T.SmsLogQuery) { + return http.download(`${BASE_URL}/export`, query) +} diff --git a/src/apis/system/smsRecord.ts b/src/apis/system/smsRecord.ts deleted file mode 100644 index 8a58928..0000000 --- a/src/apis/system/smsRecord.ts +++ /dev/null @@ -1,70 +0,0 @@ -import http from '@/utils/http' - -const BASE_URL = '/system/smsRecord' - -export interface SmsRecordResp { - id: string - configId: string - phone: string - params: string - status: string - resMsg: string - createUser: string - createTime: string - updateUser: string - updateTime: string - createUserString: string - updateUserString: string - disabled: boolean -} -export interface SmsRecordDetailResp { - id: string - configId: string - phone: string - params: string - status: string - resMsg: string - createUser: string - createTime: string - updateUser: string - updateTime: string - createUserString: string - updateUserString: string -} -export interface SmsRecordQuery { - configId: string | undefined - phone: string | undefined - status: string | undefined - sort: Array -} -export interface SmsRecordPageQuery extends SmsRecordQuery, PageQuery {} - -/** @desc 查询短信记录列表 */ -export function listSmsRecord(query: SmsRecordPageQuery) { - return http.get>(`${BASE_URL}`, query) -} - -/** @desc 查询短信记录详情 */ -export function getSmsRecord(id: string) { - return http.get(`${BASE_URL}/${id}`) -} - -/** @desc 新增短信记录 */ -export function addSmsRecord(data: any) { - return http.post(`${BASE_URL}`, data) -} - -/** @desc 修改短信记录 */ -export function updateSmsRecord(data: any, id: string) { - return http.put(`${BASE_URL}/${id}`, data) -} - -/** @desc 删除短信记录 */ -export function deleteSmsRecord(id: string) { - return http.del(`${BASE_URL}/${id}`) -} - -/** @desc 导出短信记录 */ -export function exportSmsRecord(query: SmsRecordQuery) { - return http.download(`${BASE_URL}/export`, query) -} diff --git a/src/apis/system/type.ts b/src/apis/system/type.ts index eaaafb9..32a173f 100644 --- a/src/apis/system/type.ts +++ b/src/apis/system/type.ts @@ -370,6 +370,60 @@ export interface LoginConfig { LOGIN_CAPTCHA_ENABLED: OptionResp } +/** 短信配置类型 */ +export interface SmsConfigResp { + id: string + name: string + supplier: string + accessKey: string + secretKey: string + signature: string + templateId: string + weight: string + retryInterval: string + maxRetries: string + maximum: string + supplierConfig: string + status: number + createUser: string + createTime: string + updateUser: string + updateTime: string + createUserString: string + updateUserString: string + disabled: boolean +} +export interface SmsConfigQuery { + name: string | undefined + supplier: string | undefined + accessKey: string | undefined + sort: Array +} +export interface SmsConfigPageQuery extends SmsConfigQuery, PageQuery {} + +/** 短信日志类型 */ +export interface SmsLogResp { + id: string + configId: string + phone: string + params: string + status: number + resMsg: string + createUser: string + createTime: string + updateUser: string + updateTime: string + createUserString: string + updateUserString: string +} +export interface SmsLogQuery { + configId: string | undefined + phone: string | undefined + status: number | undefined + sort: Array +} +export interface SmsLogPageQuery extends SmsLogQuery, PageQuery {} + /** 绑定三方账号信息 */ export interface BindSocialAccountRes { source: string diff --git a/src/views/system/client/index.vue b/src/views/system/client/index.vue index 7e327c8..f4ed67d 100644 --- a/src/views/system/client/index.vue +++ b/src/views/system/client/index.vue @@ -1,7 +1,6 @@