notificationMessage.ts 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. import HttpAxios from '@/utils/axios'
  2. const base = import.meta.env.VITE_API_HOST
  3. const baseUrl = `${base}/main_new_version.php`
  4. /**
  5. * 保存用户个人信息或日期和数字格式化配置
  6. * @param save_model profile 代表基本信息的save, no_profile 代表格式信息的save
  7. * @param first_name
  8. * @param last_name
  9. * @param date_fromat
  10. * @param numbers_format
  11. */
  12. export const saveUserInfo = (params: any) => {
  13. return HttpAxios.post(`${baseUrl}`, {
  14. action: 'system_setting',
  15. operate: 'personal_profile_save',
  16. ...params
  17. })
  18. }
  19. /**
  20. * 获取milestone消息列表
  21. * @param save_model profile 代表基本信息的save, no_profile 代表格式信息的save
  22. */
  23. export const getNotificationList = (params: any) => {
  24. return HttpAxios.get(`${baseUrl}`, {
  25. action: 'notifications_rules',
  26. operate: 'notifications_init',
  27. ...params
  28. })
  29. }
  30. /**
  31. * 获取notification消息的see all详情
  32. */
  33. export const getNotificationDetails = (params: any) => {
  34. return HttpAxios.post(`${baseUrl}`, {
  35. action: 'notifications_rules',
  36. operate: 'notifications_see_all',
  37. ...params
  38. })
  39. }