api.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. import {http} from './service.js'
  2. //文件上传
  3. const uploadFile =(p)=> http.upload('blade-resource/oss/endpoint/put-file', {name:'file',filePath:p})
  4. //字典
  5. const dict={
  6. list:p => http.get('/blade-system/dict-biz/dictionary', {params:p}),
  7. parentList:p => http.get('/blade-system/dict-biz/parent-list', {params:p}),
  8. dictionaryTree:p => http.get('/blade-system/dict-biz/dictionary-tree', {params:p}),
  9. }
  10. //手机验证码
  11. const sms={
  12. send:p => http.post('/sms/sendSms'+p)
  13. }
  14. const mall={
  15. //获取商场列表
  16. list:p => http.get('ldt_mall/mall/list',{params:p}),
  17. }
  18. //商户管理
  19. const shop={
  20. submitAudit:p => http.post('/shop/submitAudit',p),
  21. list:p => http.get('ldt_shop/shop/list',{params:p}),
  22. detail:p => http.get('ldt_shop/shop/detail',{params:p}),
  23. }
  24. //账号
  25. const accout={
  26. register:p => http.post('/shop/account/register',p),
  27. login:p => http.post('/shop/account/login',p),
  28. }
  29. //用户银行
  30. const userBank={
  31. detail:p => http.get('cyzh-ldt/userbank/detail',{params:p}),
  32. list:p => http.get('cyzh-ldt/userbank/list',{params:p}),
  33. appList:p => http.get('cyzh-ldt/userbank/appList',{params:p}),
  34. submit:p => http.post('cyzh-ldt/userbank/submit', p),
  35. remove:p => http.post('cyzh-ldt/userbank/remove?ids='+p),
  36. }
  37. export const api={
  38. uploadFile,
  39. dict,
  40. sms,
  41. mall,
  42. shop,
  43. accout,
  44. userBank
  45. }