index.ts 1.1 KB

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