addPointDetailByTaskDict.js 756 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import {
  2. getToken
  3. } from "@/api/token";
  4. import {
  5. myRequest
  6. } from '@/api/my-api.js'
  7. import {
  8. addPointDetailByTaskDict,
  9. completeGrowthValue
  10. } from '@/api/cooperation/coopCustomService.js'
  11. // 加积分
  12. export async function addIntegral(taskDict, point) {
  13. const tokendata = await myRequest({
  14. url: '/sys/token',
  15. method: 'get'
  16. });
  17. addPointDetailByTaskDict({
  18. taskDict: taskDict,
  19. point: point,
  20. },
  21. tokendata.data
  22. )
  23. .then((res) => {})
  24. .catch((error) => {});
  25. }
  26. // 加成长值
  27. export async function addGrowth(taskDict, isUserID) {
  28. const tokendata = await myRequest({
  29. url: '/sys/token',
  30. method: 'get'
  31. });
  32. completeGrowthValue({
  33. taskDict: taskDict,
  34. },
  35. tokendata.data
  36. )
  37. .then((res) => {})
  38. .catch((error) => {});
  39. }