sale.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. import request from '@/sheep/request';
  2. import {
  3. t
  4. } from '@/locale';
  5. const SaleApi = {
  6. // 申请成为商户
  7. createMerchant: (data) => {
  8. return request({
  9. url: '/sale/merchant-apply/create',
  10. method: 'POST',
  11. data,
  12. custom: {
  13. showSuccess: true,
  14. successMsg: t('common.apply_success')
  15. },
  16. });
  17. },
  18. // 获取商户信息
  19. getMerchant: () => {
  20. return request({
  21. url: '/sale/merchant-apply/get',
  22. method: 'GET',
  23. });
  24. },
  25. // 变动商户信息
  26. updateMerchant: (data) => {
  27. return request({
  28. url: '/sale/merchant-apply/update',
  29. method: 'PUT',
  30. data,
  31. custom: {
  32. showSuccess: true,
  33. successMsg: t('common.change_success')
  34. },
  35. });
  36. },
  37. getMerchantPage: (params) => {
  38. return request({
  39. url: '/sale/merchant-apply-log/page',
  40. method: 'GET',
  41. params,
  42. custom: {
  43. showLoading: true,
  44. },
  45. });
  46. },
  47. checkContactNumber: (params) => {
  48. return request({
  49. url: '/system/users/getUserMobile',
  50. method: 'GET',
  51. params,
  52. custom: {
  53. showLoading: true,
  54. },
  55. });
  56. },
  57. checkSystemUser: (params) => {
  58. return request({
  59. url: '/sale/merchant-apply/isSystemUserByMobile',
  60. method: 'GET',
  61. params,
  62. custom: {
  63. showLoading: true,
  64. },
  65. });
  66. },
  67. };
  68. export default SaleApi;