api.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. detail:p => http.get("cyzh-ldt/mall/detail", {params:p}),
  12. getListByPhone:p => http.get("cyzh-ldt/app/mall/getMyMallList", {params:p}),
  13. getShopLabelByMallId:p => http.get("cyzh-ldt/app/mall/getShopLabelByMallId?mallId="+p),
  14. getMallAreaByMallId:p => http.get("cyzh-ldt/app/mall/getMallAreaByMallId?mallId="+p),
  15. getShopList:p => http.get("cyzh-ldt/app/mall/getShopList",{params:p}),
  16. statistic:p => http.get("cyzh-ldt/app/mall/statistic?mallId="+p),
  17. }
  18. const memberCenter={
  19. list:p => http.get('cyzh-ldt/app/mall/getMembersByMallId',{params:p}),
  20. create:(p)=> http.post('cyzh-ldt/app/mall/createMemberCenter',p),
  21. }
  22. const shop={
  23. stop:p => http.post('cyzh-ldt/shop/update',p),
  24. detail:p => http.get("cyzh-ldt/shop/detail", {params:p}),
  25. }
  26. const activity={
  27. publish:(p)=> http.post('/cyzh-ldt/activity/submit',p),
  28. list:p => http.get("cyzh-ldt/app/mall/getActivity", {params:p}),
  29. //结束活动
  30. stop:(p)=> http.post('/cyzh-ldt/activity/updateBatch',p),
  31. //退出活动
  32. exit:(p)=> http.post('cyzh-ldt/activityjoinrecord/exitBatch',p),
  33. //参加活动
  34. join:(p)=> http.post('cyzh-ldt/activityjoinrecord/submit',p),
  35. //活动详情
  36. detail:p => http.get("/cyzh-ldt/activity/detail", {params:p}),
  37. }
  38. export const api={
  39. uploadFile,
  40. sms,
  41. mall,
  42. memberCenter,
  43. shop,
  44. activity
  45. }