index.ts 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. import request from '@/config/axios'
  2. export interface MailAccountVO {
  3. id: number
  4. mail: string
  5. username: string
  6. password: string
  7. host: string
  8. port: number
  9. sslEnable: boolean
  10. }
  11. export interface MailAccountPageReqVO extends PageParam {
  12. mail?: string
  13. username?: string
  14. }
  15. // 查询邮箱账号列表
  16. export const getMailAccountPageApi = async (params: MailAccountPageReqVO) => {
  17. return await request.get({ url: '/system/mail-account/page', params })
  18. }
  19. // 查询邮箱账号详情
  20. export const getMailAccountApi = async (id: number) => {
  21. return await request.get({ url: '/system/mail-account/get?id=' + id })
  22. }
  23. // 新增邮箱账号
  24. export const createMailAccountApi = async (data: MailAccountVO) => {
  25. return await request.post({ url: '/system/mail-account/create', data })
  26. }
  27. // 修改邮箱账号
  28. export const updateMailAccountApi = async (data: MailAccountVO) => {
  29. return await request.put({ url: '/system/mail-account/update', data })
  30. }
  31. // 删除邮箱账号
  32. export const deleteMailAccountApi = async (id: number) => {
  33. return await request.delete({ url: '/system/mail-account/delete?id=' + id })
  34. }
  35. // 获得邮箱账号精简列表
  36. export const getSimpleMailAccounts = async () => {
  37. return request.get({ url: '/system/mail-account/list-all-simple' })
  38. }