sign.js 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. import request from "@/utils/request"
  2. // 签到
  3. export const createRewardSignInRecord = (data) => {
  4. return request({
  5. url: '/app-api/menduner/reward/sign-in/record/create',
  6. method: 'POST',
  7. data,
  8. custom: {
  9. auth: true,
  10. showLoading: false
  11. }
  12. })
  13. }
  14. // 获得个人签到统计
  15. export const getRewardSignInRecordSummary = () => {
  16. return request({
  17. url: '/app-api/menduner/reward/sign-in/record/get-summary',
  18. method: 'GET',
  19. custom: {
  20. showLoading: false,
  21. auth: true
  22. }
  23. })
  24. }
  25. // 获得签到记录分页
  26. export const getRewardSignInRecordPage = (pageNo, pageSize) => {
  27. return request({
  28. url: `/app-api/menduner/reward/sign-in/record/page?pageSize=${pageSize}&pageNo=${pageNo}`,
  29. method: 'GET',
  30. custom: {
  31. showLoading: false,
  32. auth: true
  33. }
  34. })
  35. }
  36. // 获取签到规则列表
  37. export const getRewardSignInConfigList = () => {
  38. return request({
  39. url: '/app-api/menduner/reward/sign-in/config/list',
  40. method: 'GET',
  41. custom: {
  42. showLoading: false,
  43. auth: false
  44. }
  45. })
  46. }
  47. // 获取账户余额
  48. export const getAccountBalance = () => {
  49. return request({
  50. url: '/app-api/pay/wallet/get',
  51. method: 'GET',
  52. custom: {
  53. showLoading: false,
  54. auth: true
  55. }
  56. })
  57. }
  58. // 获取积分余额
  59. export const getUserAccount = () => {
  60. return request({
  61. url: '/app-api/menduner/system/mde-user/get/account',
  62. method: 'GET',
  63. custom: {
  64. showLoading: false,
  65. auth: true
  66. }
  67. })
  68. }
  69. // 福利 领领取优惠券
  70. export const takeCoupon = (templateId) => {
  71. return request({
  72. url: '/app-api/promotion/coupon/take',
  73. method: 'POST',
  74. data: { templateId },
  75. custom: {
  76. auth: true,
  77. showLoading: true,
  78. loadingMsg: '领取中',
  79. showSuccess: true,
  80. successMsg: '领取成功'
  81. }
  82. })
  83. }
  84. // 福利 优惠券ID
  85. export const getDiyTemplate = (ids) => {
  86. return request({
  87. url: '/app-api/promotion/coupon-template/list-by-ids',
  88. method: 'GET',
  89. params: {
  90. ids
  91. },
  92. custom: {
  93. auth: true,
  94. showError: false,
  95. showLoading: false,
  96. }
  97. })
  98. }
  99. // 福利 获取商城模板
  100. export const getDiyTemplateUsed = () => {
  101. return request({
  102. url: '/app-api/promotion/diy-template/used',
  103. method: 'GET',
  104. custom: {
  105. auth: true,
  106. showError: false,
  107. showLoading: false,
  108. }
  109. })
  110. }
  111. // 获取优惠券模板分页
  112. export const getCouponTemplatePage = (params) => {
  113. return request({
  114. url: '/app-api/promotion/coupon-template/page',
  115. method: 'GET',
  116. params,
  117. custom: {
  118. auth: true,
  119. showError: false,
  120. showLoading: false,
  121. }
  122. })
  123. }
  124. // 我的优惠劵列表
  125. export const getCouponPage = (params) => {
  126. return request({
  127. url: '/app-api/promotion/coupon/page',
  128. method: 'GET',
  129. params,
  130. custom: {
  131. auth: true,
  132. showError: false,
  133. showLoading: false,
  134. }
  135. })
  136. }