api.js 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. import axios from './request'
  2. // 用户登录接口
  3. export const userLogin = (data) => {
  4. return axios({
  5. method: 'post',
  6. url: '/admin/login',
  7. data
  8. })
  9. }
  10. // 修改密码
  11. export const updatePwd = (data) => {
  12. return axios({
  13. method: 'post',
  14. url: '/sys/user/updatePwd',
  15. data
  16. })
  17. }
  18. // 操作日志列表
  19. export const getList = (data) => {
  20. return axios({
  21. method: 'post',
  22. url: '/cms/activity/list',
  23. data
  24. })
  25. }
  26. // 获取活动列表
  27. export const logList = (data) => {
  28. return axios({
  29. method: 'post',
  30. url: '/sys/log/list',
  31. data
  32. })
  33. }
  34. // 新增/编辑
  35. export const activitySave = (data) => {
  36. return axios({
  37. method: 'post',
  38. url: '/cms/activity/save',
  39. data
  40. })
  41. }
  42. // 删除列表
  43. export const activityRemove = (id) => {
  44. return axios({
  45. method: 'get',
  46. url: `/cms/activity/remove/${id}`,
  47. })
  48. }
  49. // 根据id获取详情
  50. export const activityDetail = (id) => {
  51. return axios({
  52. method: 'get',
  53. url: `/cms/activity/detail/${id}`,
  54. })
  55. }
  56. // 发布
  57. export const activityPublish = (id, display) => {
  58. return axios({
  59. method: 'get',
  60. url: `/cms/activity/publish/${id}/${display}`,
  61. })
  62. }
  63. // 特别提醒编辑
  64. export const remarkEdit = (data) => {
  65. return axios({
  66. method: 'post',
  67. url: '/cms/activity/remark/edit',
  68. data
  69. })
  70. }
  71. // 特别提醒详情
  72. export const remarkDetail= () => {
  73. return axios({
  74. method: 'get',
  75. url: '/cms/activity/remark/detail',
  76. })
  77. }
  78. // 导出-excel
  79. export const exportExcel= (id) => {
  80. return axios({
  81. method: 'get',
  82. url: `/cms/activity/export/excel/${id}`,
  83. })
  84. }
  85. // 获取预约列表
  86. export const applyUserList= (data) => {
  87. return axios({
  88. method: 'post',
  89. url: '/cms/applyUser/list',
  90. data
  91. })
  92. }
  93. // 删除预约
  94. export const applyUserRemove= (id) => {
  95. return axios({
  96. method: 'get',
  97. url: `/cms/applyUser/remove/${id}`,
  98. })
  99. }