api.js 1.3 KB

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