index.ts 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. starttlsEnable: boolean
  11. }
  12. // 查询邮箱账号列表
  13. export const getMailAccountPage = async (params: PageParam) => {
  14. return await request.get({ url: '/system/mail-account/page', params })
  15. }
  16. // 查询邮箱账号详情
  17. export const getMailAccount = async (id: number) => {
  18. return await request.get({ url: '/system/mail-account/get?id=' + id })
  19. }
  20. // 新增邮箱账号
  21. export const createMailAccount = async (data: MailAccountVO) => {
  22. return await request.post({ url: '/system/mail-account/create', data })
  23. }
  24. // 修改邮箱账号
  25. export const updateMailAccount = async (data: MailAccountVO) => {
  26. return await request.put({ url: '/system/mail-account/update', data })
  27. }
  28. // 删除邮箱账号
  29. export const deleteMailAccount = async (id: number) => {
  30. return await request.delete({ url: '/system/mail-account/delete?id=' + id })
  31. }
  32. // 获得邮箱账号精简列表
  33. export const getSimpleMailAccountList = async () => {
  34. return request.get({ url: '/system/mail-account/simple-list' })
  35. }