report.js 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. import request from './request.js';
  2. const getDict = async (dictType) => {
  3. const res = await request.get({ url: `/dict/data/type/${dictType}` });
  4. return res.data;
  5. }
  6. const submitgb = async (data) => {
  7. const res = await request.post({ url: `/dangjian/xiachenganbu`, data });
  8. return res.data;
  9. }
  10. const updategb = async (data) => {
  11. const res = await request.post({ url: `/dangjian/xiachenganbu-update`, data });
  12. return res.data;
  13. }
  14. const submitdy = async (data) => {
  15. const res = await request.post({ url: `/dangjian/dangyuan`, data });
  16. return res.data;
  17. }
  18. const updatedy = async (data) => {
  19. const res = await request.post({ url: `/dangjian/dangyuan-update`, data });
  20. return res.data;
  21. }
  22. const getGbStatus = async () => {
  23. const res = await request.get({ url: `/dangjian/xiachenganbu-status` });
  24. return res.data;
  25. }
  26. const getDyStatus = async () => {
  27. const res = await request.get({ url: `/dangjian/dangyuan-status` });
  28. return res.data;
  29. }
  30. const getCommunity = async () => {
  31. const res = await request.get({ url: `/wx/addr/community` });
  32. return res.data;
  33. }
  34. // 签到
  35. // 查询是否是党员
  36. const getisdy = async () => {
  37. const res = await request.get({ url: `/dangjian/is-dangyuan` });
  38. return res.data;
  39. }
  40. // 查询是否签到
  41. const getqdstatus = async () => {
  42. const res = await request.get({ url: `/dangjian/clockin-status` });
  43. return res.data;
  44. }
  45. // 签到
  46. const clockin = async (data) => {
  47. const res = await request.post({ url: `/dangjian/clockin`, data });
  48. return res.data;
  49. }
  50. export default { getDict, submitgb, submitdy, getDyStatus, getGbStatus, getCommunity, updatedy, updategb, getisdy, getqdstatus, clockin };