index.ts 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. import request from '@/config/axios'
  2. export type SmsChannelVO = {
  3. id: number
  4. status: number
  5. signature: string
  6. remark: string
  7. apiKey: string
  8. apiSecret: string
  9. callbackUrl: string
  10. createTime: string
  11. }
  12. export interface SmsChannelPageReqVO extends PageParam {
  13. signature?: string
  14. code?: string
  15. status?: number
  16. }
  17. // 查询短信渠道列表
  18. export const getSmsChannelPageApi = (params: SmsChannelPageReqVO) => {
  19. return request.get({ url: '/system/sms-channel/page', params })
  20. }
  21. // 获得短信渠道精简列表
  22. export function getSimpleSmsChannels() {
  23. return request.get({ url: '/system/sms-channel/list-all-simple' })
  24. }
  25. // 查询短信渠道详情
  26. export const getSmsChannelApi = (id: number) => {
  27. return request.get({ url: '/system/sms-channel/get?id=' + id })
  28. }
  29. // 新增短信渠道
  30. export const createSmsChannelApi = (data: SmsChannelVO) => {
  31. return request.post({ url: '/system/sms-channel/create', data })
  32. }
  33. // 修改短信渠道
  34. export const updateSmsChannelApi = (data: SmsChannelVO) => {
  35. return request.put({ url: '/system/sms-channel/update', data })
  36. }
  37. // 删除短信渠道
  38. export const deleteSmsChannelApi = (id: number) => {
  39. return request.delete({ url: '/system/sms-channel/delete?id=' + id })
  40. }