api.js 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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('/shop/account/login',p),
  12. detail:p => http.get("cyzh-ldt/mall/detail", {params:p}),
  13. getListByPhone:p => http.get("/ldt_mall/mall/list", {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('/common/account/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. update:(p)=> http.post('cyzh-ldt/app/mall/updateMemberCenter',p),
  32. }
  33. const shop={
  34. update:p => http.post('cyzh-ldt/shop/update',p),
  35. submit:p => http.post('cyzh-ldt/shop/submit',p),
  36. detail:p => http.get("cyzh-ldt/shop/detail", {params:p}),
  37. }
  38. const activity={
  39. publish:(p)=> http.post('/cyzh-ldt/activity/submit',p),
  40. list:p => http.get("cyzh-ldt/app/mall/getActivity", {params:p}),
  41. //结束活动
  42. stop:(p)=> http.post('/cyzh-ldt/activity/updateBatch',p),
  43. //退出活动
  44. exit:(p)=> http.post('cyzh-ldt/activityjoinrecord/exitBatch',p),
  45. //参加活动
  46. join:(p)=> http.post('cyzh-ldt/activityjoinrecord/submit',p),
  47. //活动详情
  48. detail:p => http.get("/cyzh-ldt/activity/detail", {params:p}),
  49. //修改活动状态
  50. submit:p => http.post("/cyzh-ldt/activity/submit", p),
  51. //活动审核列表
  52. auditList:p => http.get('cyzh-ldt/activity/list', {params:p}),
  53. }
  54. export const api={
  55. uploadFile,
  56. sms,
  57. mall,
  58. appaccount,
  59. memberCenter,
  60. shop,
  61. activity
  62. }