sign.js 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  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. openEncryption: true,
  65. showLoading: false,
  66. auth: true
  67. }
  68. })
  69. }
  70. // 福利 领领取优惠券
  71. export const takeCoupon = (templateId) => {
  72. return request({
  73. url: '/app-api/promotion/coupon/take',
  74. method: 'POST',
  75. data: { templateId },
  76. custom: {
  77. auth: true,
  78. showLoading: true,
  79. loadingMsg: '领取中',
  80. showSuccess: true,
  81. successMsg: '领取成功'
  82. }
  83. })
  84. }
  85. // 福利 优惠券ID
  86. export const getDiyTemplate = (ids) => {
  87. return request({
  88. url: '/app-api/promotion/coupon-template/list-by-ids',
  89. method: 'GET',
  90. params: {
  91. ids
  92. },
  93. custom: {
  94. auth: true,
  95. showError: false,
  96. showLoading: false,
  97. }
  98. })
  99. }
  100. // 福利 获取商城模板
  101. export const getDiyTemplateUsed = () => {
  102. return request({
  103. url: '/app-api/promotion/diy-template/used',
  104. method: 'GET',
  105. custom: {
  106. auth: true,
  107. showError: false,
  108. showLoading: false,
  109. }
  110. })
  111. }
  112. // 获取优惠券模板分页
  113. export const getCouponTemplatePage = (params) => {
  114. return request({
  115. url: '/app-api/promotion/coupon-template/page',
  116. method: 'GET',
  117. params,
  118. custom: {
  119. auth: false,
  120. showError: false,
  121. showLoading: false,
  122. }
  123. })
  124. }
  125. // 我的优惠劵列表
  126. export const getCouponPage = (params) => {
  127. return request({
  128. url: '/app-api/promotion/coupon/page',
  129. method: 'GET',
  130. params,
  131. custom: {
  132. auth: true,
  133. showError: false,
  134. showLoading: false,
  135. }
  136. })
  137. }
  138. // 获得钱包充值记录分页
  139. export const getUserWalletRechargePage = async (params) => {
  140. return request({
  141. url: '/app-api/pay/wallet-recharge/page',
  142. method: 'GET',
  143. params,
  144. custom: {
  145. showLoading: false,
  146. auth: true
  147. }
  148. })
  149. }
  150. // 账户变动记录
  151. export const getEnterpriseAccountRecordPage = async (params) => {
  152. return request({
  153. url: '/app-api/menduner/system/recruit/enterprise/account/record/page',
  154. method: 'GET',
  155. params,
  156. custom: {
  157. showLoading: false,
  158. auth: true
  159. }
  160. })
  161. }