InviteApi.js 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  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. postFriendRewardAdd(fid, success, fail) {
  61. let url = "/friendReward/add.do";
  62. let data = {
  63. fid: fid
  64. };
  65. let requestBody = {
  66. url: url,
  67. data: data,
  68. success: success,
  69. fail: fail,
  70. complete: () => {
  71. }
  72. };
  73. Api.httpPost(requestBody);
  74. }
  75. getFriendRewardList(success, fail) {
  76. let url = "/friendReward/getList.do";
  77. let requestBody = {
  78. url: url,
  79. success: success,
  80. fail: fail,
  81. complete: () => {
  82. }
  83. };
  84. Api.httpGet(requestBody);
  85. }
  86. postFriendGainAward(rewardId, success, fail) {
  87. let url = "/friendReward/reward.do";
  88. let data = {
  89. rewardId: rewardId
  90. };
  91. let requestBody = {
  92. url: url,
  93. data: data,
  94. success: success,
  95. fail: fail,
  96. complete: () => {
  97. }
  98. };
  99. Api.httpPost(requestBody);
  100. }
  101. }
  102. module.exports = new InviteApi();