api.js 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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=p => http.get('/blade-system/dict-biz/dictionary', {params:p})
  6. //手机验证码
  7. const sms={
  8. send:p => http.post('huawei/sms/sendSms'+p),
  9. validCode:(p)=> http.post('huawei/sms/validCode'+p)
  10. }
  11. const mall={
  12. //获取商场列表
  13. list:p => http.get('cyzh-ldt/mall/list',{params:p}),
  14. //获取商场区域
  15. getMallAreaByMallId:p => http.get('cyzh-ldt/app/mall/getMallAreaByMallId?mallId='+p),
  16. //获取标签
  17. getShopLabelByMallId:p => http.get("cyzh-ldt/app/mall/getShopLabelByMallId?mallId="+p),
  18. }
  19. //商户管理
  20. const shop={
  21. //获取商户列表
  22. list:p => http.get('cyzh-ldt/shop/list',{params:p}),
  23. detail:p => http.get('cyzh-ldt/shop/detail',{params:p}),
  24. submit:(p)=> http.post('cyzh-ldt/shop/submit',p),
  25. statistic:p => http.get('cyzh-ldt/app/shop/statistic?shopId='+p),
  26. }
  27. const memberCenter={
  28. list:p => http.get('cyzh-ldt/app/shop/getMembersByShopId',{params:p}),
  29. create:(p)=> http.post('cyzh-ldt/app/shop/createMemberCenter',p),
  30. }
  31. const activity={
  32. publish:(p)=> http.post('/cyzh-ldt/activity/submit',p),
  33. list:p => http.get("cyzh-ldt/app/shop/getActivity", {params:p}),
  34. //结束活动
  35. stop:(p)=> http.post('/cyzh-ldt/activity/updateBatch',p),
  36. //退出活动
  37. exit:(p)=> http.post('cyzh-ldt/activityjoinrecord/exitBatch',p),
  38. //参加活动
  39. join:(p)=> http.post('cyzh-ldt/activityjoinrecord/submit',p),
  40. //活动详情
  41. detail:p => http.get("/cyzh-ldt/activity/detail", {params:p}),
  42. }
  43. //用户银行
  44. const userBank={
  45. detail:p => http.get('cyzh-ldt/userbank/detail',{params:p}),
  46. list:p => http.get('cyzh-ldt/userbank/list',{params:p}),
  47. appList:p => http.get('cyzh-ldt/userbank/appList',{params:p}),
  48. submit:p => http.post('cyzh-ldt/userbank/submit', p),
  49. remove:p => http.post('cyzh-ldt/userbank/remove?ids='+p),
  50. }
  51. export const api={
  52. uploadFile,
  53. dict,
  54. sms,
  55. mall,
  56. shop,
  57. memberCenter,
  58. activity,
  59. userBank
  60. }