signin.js 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. import request from '@/sheep/request';
  2. const SignInApi = {
  3. // 获得签到规则列表
  4. getSignInConfigList: () => {
  5. return request({
  6. url: '/member/sign-in/config/list',
  7. method: 'GET',
  8. });
  9. },
  10. // 获得个人签到统计
  11. getSignInRecordSummary: () => {
  12. return request({
  13. url: '/member/sign-in/record/get-summary',
  14. method: 'GET',
  15. });
  16. },
  17. // 获得
  18. getOwnSignInMoon: (params) => {
  19. return request({
  20. url: '/member/sign-in/record/get-own-signInMoon',
  21. method: 'GET',
  22. params
  23. });
  24. },
  25. // 签到
  26. createSignInRecord: () => {
  27. return request({
  28. url: '/distri/user-sign-in-log/create',
  29. method: 'POST',
  30. });
  31. },
  32. // 获得签到记录分页
  33. getSignRecordPage: (params) => {
  34. console.log(params)
  35. const queryString = Object.keys(params)
  36. .map((key) => encodeURIComponent(key) + '=' + params[key])
  37. .join('&');
  38. return request({
  39. url: `/member/sign-in/record/page?${queryString}`,
  40. method: 'GET',
  41. });
  42. },
  43. };
  44. export default SignInApi;