api.js 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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 sms={
  6. send:p => http.post('huawei/sms/sendSms'+p),
  7. validCode:(p)=> http.post('huawei/sms/validCode'+p)
  8. }
  9. //商场管理
  10. const mall={
  11. login:p => http.post('/cyzh-ldt/appaccount/login',p),
  12. detail:p => http.get("cyzh-ldt/mall/detail", {params:p}),
  13. getListByPhone:p => http.get("cyzh-ldt/app/mall/getMyMallList", {params:p}),
  14. getShopLabelByMallId:p => http.get("cyzh-ldt/app/mall/getShopLabelByMallId?mallId="+p),
  15. getMallAreaByMallId:p => http.get("cyzh-ldt/app/mall/getMallAreaByMallId?mallId="+p),
  16. getShopList:p => http.get("cyzh-ldt/app/mall/getShopList",{params:p}),
  17. statistic:p => http.get("cyzh-ldt/app/mall/statistic?mallId="+p),
  18. }
  19. const appaccount={
  20. login:p => http.post('/cyzh-ldt/appaccount/login',p),
  21. setPassword:p => http.post('/cyzh-ldt/appaccount/setPassword',p),
  22. }
  23. const memberCenter={
  24. list:p => http.get('cyzh-ldt/app/mall/getMembersByMallId',{params:p}),
  25. create:(p)=> http.post('cyzh-ldt/app/mall/createMemberCenter',p),
  26. }
  27. const shop={
  28. update:p => http.post('cyzh-ldt/shop/update',p),
  29. submit:p => http.post('cyzh-ldt/shop/submit',p),
  30. detail:p => http.get("cyzh-ldt/shop/detail", {params:p}),
  31. }
  32. const activity={
  33. publish:(p)=> http.post('/cyzh-ldt/activity/submit',p),
  34. list:p => http.get("cyzh-ldt/app/mall/getActivity", {params:p}),
  35. //结束活动
  36. stop:(p)=> http.post('/cyzh-ldt/activity/updateBatch',p),
  37. //退出活动
  38. exit:(p)=> http.post('cyzh-ldt/activityjoinrecord/exitBatch',p),
  39. //参加活动
  40. join:(p)=> http.post('cyzh-ldt/activityjoinrecord/submit',p),
  41. //活动详情
  42. detail:p => http.get("/cyzh-ldt/activity/detail", {params:p}),
  43. //修改活动状态
  44. submit:p => http.post("/cyzh-ldt/activity/submit", p),
  45. //活动审核列表
  46. auditList:p => http.get('cyzh-ldt/activity/list', {params:p}),
  47. }
  48. export const api={
  49. uploadFile,
  50. sms,
  51. mall,
  52. appaccount,
  53. memberCenter,
  54. shop,
  55. activity
  56. }