activity.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. import request from './request.js';
  2. const getActivity = async data => {
  3. const res = await request.get({ url: `/activity/list`, data });
  4. return res.data;
  5. }
  6. const getdetails = async ({ activityId }) => {
  7. const res = await request.get({ url: `/activity/${activityId}` });
  8. return res.data;
  9. }
  10. const getstatus = async ({ activityId }) => {
  11. const res = await request.get({ url: `/activity/status/${activityId}` });
  12. return res.data;
  13. }
  14. const report = async ({ activityId }) => {
  15. const res = await request.post({ url: `/activity/report/${activityId}` });
  16. return res.data;
  17. }
  18. const offReport = async ({ activityId }) => {
  19. const res = await request.del({ url: `/activity/report-cancel/${activityId}` });
  20. return res.data;
  21. }
  22. const uploadImgs = async data => {
  23. const res = await request.post({ url: `/activity/submit-photo`, data });
  24. return res.data;
  25. }
  26. const getPhotos = async ({ activityId }) => {
  27. const res = await request.get({ url: `/activity/log-details/${activityId}` });
  28. return res.data;
  29. }
  30. const getTypeList = async ({ alias }) => {
  31. const res = await request.get({ url: `/cms/type/sublist/${alias}` });
  32. return res.data;
  33. }
  34. export default { getActivity, getdetails, getstatus, report, offReport, uploadImgs, getPhotos, getTypeList };