shop.js 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  1. // +----------------------------------------------------------------------
  2. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  3. // +----------------------------------------------------------------------
  4. // | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
  5. // +----------------------------------------------------------------------
  6. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  7. // +----------------------------------------------------------------------
  8. // | Author: CRMEB Team <admin@crmeb.com>
  9. // +----------------------------------------------------------------------
  10. import request from '@/libs/request';
  11. /**
  12. * @description 获取商户分类列表
  13. */
  14. export function lst(data) {
  15. return request({
  16. url: `merchant/category/lst`,
  17. method: 'get',
  18. data,
  19. });
  20. }
  21. /**
  22. * @description 新增商户分类
  23. */
  24. export function addcreate(data) {
  25. return request({
  26. url: `merchant/category/create`,
  27. method: 'POST',
  28. data,
  29. });
  30. }
  31. /**
  32. * @description 新增商户分类
  33. */
  34. export function getCreate(data) {
  35. return request({
  36. url: `merchant/category/getCreate`,
  37. method: 'get',
  38. data,
  39. });
  40. }
  41. /**
  42. * @description 获取商户分类详情
  43. */
  44. export function getedit(data, id) {
  45. return request({
  46. url: `merchant/category/${id}/edit`,
  47. method: 'get',
  48. data,
  49. });
  50. }
  51. /**
  52. * @description 修改商户分类信息
  53. */
  54. export function editcategory(data, id) {
  55. return request({
  56. url: `merchant/category/update/${id}`,
  57. method: 'POST',
  58. data,
  59. });
  60. }
  61. /**
  62. * @description 删除商户分类
  63. */
  64. export function deletecategory(data, id) {
  65. return request({
  66. url: `merchant/category/delete/${id}`,
  67. method: 'get',
  68. data,
  69. });
  70. }
  71. /**
  72. * @description 获取权限
  73. */
  74. export function getRole(data) {
  75. return request({
  76. url: `merchant/type/getRole`,
  77. method: 'get',
  78. data,
  79. });
  80. }
  81. /**
  82. * @description 删除类型
  83. */
  84. export function deleteType(data, id) {
  85. return request({
  86. url: `merchant/type/delete/${id}`,
  87. method: 'get',
  88. data,
  89. });
  90. }
  91. /**
  92. * @description 更新类型类型
  93. */
  94. export function updataType(data, id) {
  95. return request({
  96. url: `merchant/type/update/${id}`,
  97. method: 'POST',
  98. data,
  99. });
  100. }
  101. /**
  102. * @description 获取修改信息
  103. */
  104. export function getType(data, id) {
  105. return request({
  106. url: `merchant/type/${id}/edit`,
  107. method: 'get',
  108. data,
  109. });
  110. }
  111. /**
  112. * @description 添加类型
  113. */
  114. export function addType(data) {
  115. return request({
  116. url: `merchant/type/create`,
  117. method: 'POST',
  118. data,
  119. });
  120. }
  121. /**
  122. * @description 获取类型列表
  123. */
  124. export function typeList(data) {
  125. return request({
  126. url: `merchant/type/lst`,
  127. method: 'get',
  128. data,
  129. });
  130. }
  131. /**
  132. * @description 拒绝申请
  133. */
  134. export function refuse(data, id) {
  135. return request({
  136. url: `merchant/intention/refuse/${id}`,
  137. method: 'get',
  138. params: data,
  139. });
  140. }
  141. /**
  142. * @description 同意申请
  143. */
  144. export function adopt(data, id) {
  145. return request({
  146. url: `merchant/intention/adopt/${id}`,
  147. method: 'get',
  148. data,
  149. });
  150. }
  151. /**
  152. * @description 申请列表
  153. * * @param {Object} param data {Object} 申请列表传值
  154. */
  155. export function intentionList(data) {
  156. return request({
  157. url: `merchant/intention/lst`,
  158. method: 'get',
  159. params: data,
  160. });
  161. }
  162. /**
  163. * @description 修改密码
  164. */
  165. export function changepwd(data, id) {
  166. return request({
  167. url: `merchant/admin/update/${id}`,
  168. method: 'post',
  169. data,
  170. });
  171. }
  172. /**
  173. * @description 更新商户数据
  174. */
  175. export function updataadmin(data, id) {
  176. return request({
  177. url: `merchant/update/${id}`,
  178. method: 'post',
  179. data,
  180. });
  181. }
  182. /**
  183. * @description 添加商户
  184. */
  185. export function addadmin(data) {
  186. return request({
  187. url: `merchant/create`,
  188. method: 'post',
  189. data,
  190. });
  191. }
  192. /**
  193. * @description 获取商户详情
  194. */
  195. export function getmerchent(data, id) {
  196. return request({
  197. url: `merchant/${id}/edit`,
  198. method: 'get',
  199. data,
  200. });
  201. }
  202. /**
  203. * @description 获取商户列表
  204. * * * @param {Object} param data {Object} 商户列表传值
  205. */
  206. export function merchentlist(data) {
  207. return request({
  208. url: `merchant/lst`,
  209. method: 'get',
  210. params: data
  211. });
  212. }
  213. /**
  214. * @description 后台-商户-禁用/正常
  215. */
  216. export function forbidden(data) {
  217. return request({
  218. url: `merchant/forbidden`,
  219. method: 'POST',
  220. data,
  221. });
  222. }
  223. /**
  224. * @description 后台-商户-开启关闭
  225. */
  226. export function openMerchant(data) {
  227. return request({
  228. url: `merchant/openMerchant`,
  229. method: 'POST',
  230. data,
  231. });
  232. }
  233. /**
  234. * @description 后台-商户-开启关闭
  235. */
  236. export function merchantLoginApi(data, id) {
  237. return request({
  238. url: `merchant/login/${id}`,
  239. method: 'get',
  240. data,
  241. });
  242. }