api.js 2.3 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 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. getTagManageList:p => http.get("cyzh-ldt/mallshoplabel/list",{params:p}),
  19. getTagSelect:p => http.get("cyzh-ldt/gxlabel/list",{params:p}),
  20. getSetTag:p => http.post("cyzh-ldt/mallshoplabel/mall/setLabels",p),
  21. getTagRemove:p => http.post("cyzh-ldt/mallshoplabel/remove?ids="+p)
  22. }
  23. const appaccount={
  24. login:p => http.post('/cyzh-ldt/appaccount/login',p),
  25. setPassword:p => http.post('/cyzh-ldt/appaccount/setPassword',p),
  26. forgetPassword:p => http.post('/cyzh-ldt/appaccount/forgetPassword',p),
  27. }
  28. const memberCenter={
  29. list:p => http.get('cyzh-ldt/app/mall/getMembersByMallId',{params:p}),
  30. create:(p)=> http.post('cyzh-ldt/app/mall/createMemberCenter',p),
  31. }
  32. const shop={
  33. update:p => http.post('cyzh-ldt/shop/update',p),
  34. submit:p => http.post('cyzh-ldt/shop/submit',p),
  35. detail:p => http.get("cyzh-ldt/shop/detail", {params:p}),
  36. }
  37. const activity={
  38. publish:(p)=> http.post('/cyzh-ldt/activity/submit',p),
  39. list:p => http.get("cyzh-ldt/app/mall/getActivity", {params:p}),
  40. //结束活动
  41. stop:(p)=> http.post('/cyzh-ldt/activity/updateBatch',p),
  42. //退出活动
  43. exit:(p)=> http.post('cyzh-ldt/activityjoinrecord/exitBatch',p),
  44. //参加活动
  45. join:(p)=> http.post('cyzh-ldt/activityjoinrecord/submit',p),
  46. //活动详情
  47. detail:p => http.get("/cyzh-ldt/activity/detail", {params:p}),
  48. //修改活动状态
  49. submit:p => http.post("/cyzh-ldt/activity/submit", p),
  50. //活动审核列表
  51. auditList:p => http.get('cyzh-ldt/activity/list', {params:p}),
  52. }
  53. export const api={
  54. uploadFile,
  55. sms,
  56. mall,
  57. appaccount,
  58. memberCenter,
  59. shop,
  60. activity
  61. }