api.js 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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 dict=p => http.get('/blade-system/dict-biz/dictionary', {params:p})
  6. //手机验证码
  7. const sms={
  8. send:p => http.post('huawei/sms/sendSms'+p),
  9. validCode:(p)=> http.post('huawei/sms/validCode'+p)
  10. }
  11. const mall={
  12. //获取商场列表
  13. list:p => http.get('cyzh-ldt/mall/list',{params:p}),
  14. //获取商场区域
  15. getMallAreaByMallId:p => http.get('cyzh-ldt/app/mall/getMallAreaByMallId?mallId='+p),
  16. //获取标签
  17. getShopLabelByMallId:p => http.get("cyzh-ldt/app/mall/getShopLabelByMallId?mallId="+p),
  18. //全部标签
  19. getShopLabelAll:p => http.get("cyzh-ldt/gxlabel/list",{params:p}),
  20. }
  21. //商户管理
  22. const shop={
  23. //获取商户列表
  24. list:p => http.get('cyzh-ldt/shop/list',{params:p}),
  25. detail:p => http.get('cyzh-ldt/shop/detail',{params:p}),
  26. submit:(p)=> http.post('cyzh-ldt/shop/submit',p),
  27. statistic:p => http.get('cyzh-ldt/app/shop/statistic?shopId='+p),
  28. payBefore:p => http.post('cyzh-ldt/loginuser/payBefore',p),
  29. yingshouPage:p => http.get('cyzh-ldt/app/shop/getYingShouPage',{params:p}),
  30. remainDetailPage:p => http.get('cyzh-ldt/app/shop/getRemainDetailPage',{params:p}),
  31. }
  32. const memberCenter={
  33. list:p => http.get('cyzh-ldt/app/shop/getMembersByShopId',{params:p}),
  34. create:(p)=> http.post('cyzh-ldt/app/shop/createMemberCenter',p),
  35. }
  36. const activity={
  37. publish:(p)=> http.post('/cyzh-ldt/activity/submit',p),
  38. list:p => http.get("cyzh-ldt/app/shop/getActivity", {params:p}),
  39. //结束活动
  40. stop:(p)=> http.post('/cyzh-ldt/activity/updateBatch',p),
  41. //退出活动
  42. exit:(p)=> http.post('cyzh-ldt/activityjoinrecord/exitBatch',p),
  43. //参加活动
  44. join:(p)=> http.post('cyzh-ldt/activityjoinrecord/submit',p),
  45. //活动详情
  46. detail:p => http.get("/cyzh-ldt/activity/detail", {params:p}),
  47. }
  48. //用户银行
  49. const userBank={
  50. detail:p => http.get('cyzh-ldt/userbank/detail',{params:p}),
  51. list:p => http.get('cyzh-ldt/userbank/list',{params:p}),
  52. appList:p => http.get('cyzh-ldt/userbank/appList',{params:p}),
  53. submit:p => http.post('cyzh-ldt/userbank/submit', p),
  54. remove:p => http.post('cyzh-ldt/userbank/remove?ids='+p),
  55. }
  56. //accout
  57. const accout={
  58. register:p => http.post('cyzh-ldt/appaccount/shop/register',p),
  59. login:p => http.post('cyzh-ldt/appaccount/login',p),
  60. modifPaw:p => http.post('cyzh-ldt/appaccount/setPassword',p),
  61. forgetPaw:p => http.post('cyzh-ldt/appaccount/forgetPassword',p),
  62. }
  63. export const api={
  64. uploadFile,
  65. dict,
  66. sms,
  67. mall,
  68. shop,
  69. memberCenter,
  70. activity,
  71. accout
  72. }