index.ts 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. import { defHttp } from '@/config/axios'
  2. import type { SmsChannelVO } from './types'
  3. // 查询短信渠道列表
  4. export const getSmsChannelPageApi = ({ params }) => {
  5. return defHttp.get<PageResult<SmsChannelVO>>({ url: '/system/sms-channel/page', params })
  6. }
  7. // 获得短信渠道精简列表
  8. export function getSimpleSmsChannels() {
  9. return defHttp.get({ url: '/system/sms-channel/list-all-simple' })
  10. }
  11. // 查询短信渠道详情
  12. export const getSmsChannelApi = (id: number) => {
  13. return defHttp.get<SmsChannelVO>({ url: '/system/sms-channel/get?id=' + id })
  14. }
  15. // 新增短信渠道
  16. export const createSmsChannelApi = (params: SmsChannelVO) => {
  17. return defHttp.post({ url: '/system/sms-channel/create', params })
  18. }
  19. // 修改短信渠道
  20. export const updateSmsChannelApi = (params: SmsChannelVO) => {
  21. return defHttp.put({ url: '/system/sms-channel/update', params })
  22. }
  23. // 删除短信渠道
  24. export const deleteSmsChannelApi = (id: number) => {
  25. return defHttp.delete({ url: '/system/sms-channel/delete?id=' + id })
  26. }