InviteApi.js 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. const Api = require('../net/Api');
  2. class InviteApi {
  3. getInviteMissionList(success, fail) {
  4. let url = "/inviteReward/getInviteRewardInfo.do";
  5. let requestBody = {
  6. url: url,
  7. success: success,
  8. fail: fail,
  9. complete: () => {
  10. }
  11. };
  12. Api.httpGet(requestBody);
  13. }
  14. postGainAward(rid, success, fail) {
  15. let url = "/inviteReward/getInviteReward.do";
  16. let data = {
  17. rid: rid
  18. };
  19. let requestBody = {
  20. url: url,
  21. data: data,
  22. success: success,
  23. fail: fail,
  24. complete: () => {
  25. }
  26. };
  27. Api.httpPost(requestBody);
  28. }
  29. postInviteFriend(fid, success, fail) {
  30. let url = "/inviteReward/addInviteReward.do";
  31. let data = {
  32. fid: fid
  33. };
  34. let requestBody = {
  35. url: url,
  36. data: data,
  37. success: success,
  38. fail: fail,
  39. complete: () => {
  40. }
  41. };
  42. Api.httpPost(requestBody);
  43. }
  44. postLoginReward(rewardId, isShare, success, fail) {
  45. let url = "/lReward/getLoginReward.do";
  46. let data = {
  47. rewardId: rewardId,
  48. isShare: isShare
  49. };
  50. let requestBody = {
  51. url: url,
  52. data: data,
  53. success: success,
  54. fail: fail,
  55. complete: () => {
  56. }
  57. };
  58. Api.httpPost(requestBody);
  59. }
  60. }
  61. module.exports = new InviteApi();