groupPackageManagement.ts 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. import { ResPage, StoreUser } from "@/api/interface/index";
  2. import { PORT_NONE } from "@/api/config/servicePort";
  3. import http from "@/api";
  4. /**
  5. * @name 商铺用户模块
  6. */
  7. // 获取商铺用户列表
  8. export const getThaliList = params => {
  9. return http.get<ResPage<StoreUser.ResStoreUserList>>(PORT_NONE + `/PcGroupBuy/getThaliList`, params);
  10. };
  11. export const saveStoreInfo = (params: { id: string }) => {
  12. return http.post(PORT_NONE + `/store/info/saveStoreInfo`, params);
  13. };
  14. export const getUserByPhone = params => {
  15. return http.get(PORT_NONE + `/store/user/getUserByPhone`, params);
  16. };
  17. export const getDetail = params => {
  18. return http.get(PORT_NONE + `/store/info/getDetail`, params);
  19. };
  20. export const getMenuByStoreId = params => {
  21. return http.get(PORT_NONE + `/menuPlatform/getMenuByStoreId`, params);
  22. };
  23. // 新增商家端用户
  24. export const addStoreUser = (params: { id: string }) => {
  25. return http.post(PORT_NONE + `/store/user/addStoreUser`, params);
  26. };
  27. // 修改商家端用户
  28. export const editStoreUser = (params: { id: string }) => {
  29. return http.post(PORT_NONE + `/store/user/editStoreUser`, params);
  30. };
  31. // 重置商家端用户密码及支付密码
  32. export const resetStoreUserPassword = (params: { id: string }) => {
  33. return http.put(PORT_NONE + `/store/user/resetStoreUserPassword`, params);
  34. };
  35. // 删除商家端用户
  36. export const deleteStoreUser = (params: { id: string }) => {
  37. return http.delete(PORT_NONE + `/store/user/deleteStoreUser`, params);
  38. };
  39. // 切换商家端用户状态
  40. export const switchingStates = (params: { id: string }) => {
  41. return http.put(PORT_NONE + `/store/user/switchingStates`, params);
  42. };
  43. // 获取商铺列表
  44. export const getStoreInfoList = (params: StoreUser.ReqUserParams) => {
  45. return http.get<ResPage<StoreUser.ResStoreUserList>>(PORT_NONE + `/store/info/getStorePage`, params);
  46. };
  47. //获取商铺经营板块列表
  48. export const getBusinessSection = () => {
  49. return http.get(PORT_NONE + `/store/info/getBusinessSection`);
  50. };
  51. //获取商铺经营种类列表
  52. export const getBusinessSectionTypes = (params: { parentId: string }) => {
  53. return http.get<ResPage<StoreUser.ResStoreUserList>>(PORT_NONE + `/store/info/getBusinessSectionTypes`, params);
  54. };
  55. //获取未绑定的商家端账号
  56. export const getUnboundAccountList = (params: { id: string }) => {
  57. return http.get(PORT_NONE + `/store/info/getUnboundAccountList`, params);
  58. };
  59. //新增经营板块
  60. export const addBusinessSectionAndTypes = (params: {
  61. businessSectionName: string;
  62. businessTypeValue: string;
  63. businessTypesList: [];
  64. }) => {
  65. return http.post(PORT_NONE + `/store/info/addBusinessSectionAndTypes`, params);
  66. };
  67. //新增商铺信息
  68. //获取商铺明细信息
  69. export const getStoreDetail = (params: StoreUser.ReqUserParams) => {
  70. return http.get<StoreUser.ResStoreUserList>(PORT_NONE + `/store/info/getStoreDetail`, params);
  71. };
  72. //新增商铺信息
  73. export const editStoreInfo = (params: { id: string }) => {
  74. return http.post(PORT_NONE + `/store/info/editStoreInfo`, params);
  75. };
  76. // 删除商铺信息
  77. export const deleteStoreInfo = (params: { id: string }) => {
  78. return http.post(PORT_NONE + `/store/info/deleteStoreInfo`, params);
  79. };
  80. //审批商户
  81. export const approveStoreInfo = (params: { id: string; approvalStatus: number; reason: string }) => {
  82. return http.get(PORT_NONE + `/store/info/approveStoreInfo`, params);
  83. };
  84. //审批商户续约
  85. export const updateContractImageStatus = (params: { id: string; approvalStatus: number }) => {
  86. return http.post(PORT_NONE + `/store/info/updateContractImageStatus`, params);
  87. };
  88. //审批经营许可证变更
  89. export const updatefoodLicenceImageStatus = (params: { id: string; approvalStatus: number }) => {
  90. return http.post(PORT_NONE + `/store/info/updatefoodLicenceImageStatus`, params);
  91. };
  92. // 重置商户或者用户密码
  93. export const resetStoreUserPassWord = (params: { id: string }) => {
  94. return http.post(PORT_NONE + `/store/info/restPassword`, params);
  95. };
  96. // 获取店铺状态
  97. export const getStoreAuditStatus = (params: { id: string }) => {
  98. return http.post(PORT_NONE + `/store/info/getStoreAuditStatus`, params);
  99. };
  100. //商铺页面导出excel
  101. export const exportExcel = (params: {}) => {
  102. return http.get(PORT_NONE + `/store/info/exportExcel`, params);
  103. };
  104. //商铺过期查询页面导出excel
  105. export const exportExcelExpirationTime = (params: {}) => {
  106. return http.get(
  107. PORT_NONE +
  108. `/store/info/exportExcelExpirationTime
  109. `,
  110. params
  111. );
  112. };
  113. //商铺用户页面导出excel
  114. export const exportUserExcel = (params: {}) => {
  115. return http.get(
  116. PORT_NONE +
  117. `/store/user/exportExcel
  118. `,
  119. params
  120. );
  121. };
  122. //根据详细信息获取经纬度名称
  123. export const getInputPrompt = (params: StoreUser.ReqUserParams) => {
  124. return http.get<StoreUser.ResStoreUserList>(PORT_NONE + `/gaode/getInputPrompt`, params);
  125. };
  126. //获取行政区域信息
  127. export const getDistrict = (params: StoreUser.ReqUserParams) => {
  128. return http.get<StoreUser.ResStoreUserList>(PORT_NONE + `/gaode/getDistrict`, params);
  129. };
  130. // 更改店铺抽成百分比
  131. export const updateStoreCommissionRate = (params: { id: string; commissionRate: any }) => {
  132. return http.post(PORT_NONE + `/store/info/updateStoreCommissionRate`, params);
  133. };
  134. // 节假日列表
  135. export const getHolidayList = (params: any) => {
  136. return http.get<StoreUser.ResStoreUserList>(PORT_NONE + `/couponPlatform/getHolidayList`, params);
  137. };
  138. // 节假日列表
  139. export const saveHoliday = (params: any) => {
  140. return http.post<StoreUser.ResStoreUserList>(PORT_NONE + `/coupon/saveHoliday`, params);
  141. };
  142. //删除节假日
  143. export const delHoliday = (params: any) => {
  144. return http.get<StoreUser.ResStoreUserList>(PORT_NONE + `/coupon/delHoliday`, params);
  145. };
  146. // 按年份删除节假日
  147. export const delHolidayByYear = (params: any) => {
  148. return http.get<StoreUser.ResStoreUserList>(PORT_NONE + `/coupon/delHolidayByYear`, params);
  149. };
  150. //启用禁用节假日
  151. export const openCloseHoliday = (params: any) => {
  152. return http.get<StoreUser.ResStoreUserList>(PORT_NONE + `/coupon/openCloseHoliday`, params);
  153. };