api.js 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. //商户管理
  20. const shop={
  21. //获取商户列表
  22. list:p => http.get('cyzh-ldt/shop/list',{params:p}),
  23. detail:p => http.get('cyzh-ldt/shop/detail',{params:p}),
  24. submit:(p)=> http.post('cyzh-ldt/shop/submit',p),
  25. statistic:p => http.get('cyzh-ldt/app/shop/statistic?shopId='+p),
  26. yingshouPage:p => http.get('cyzh-ldt/app/shop/getYingShouPage',{params:p}),
  27. remainDetailPage:p => http.get('cyzh-ldt/app/shop/getRemainDetailPage',{params:p}),
  28. }
  29. const memberCenter={
  30. list:p => http.get('cyzh-ldt/app/shop/getMembersByShopId',{params:p}),
  31. create:(p)=> http.post('cyzh-ldt/app/shop/createMemberCenter',p),
  32. }
  33. const activity={
  34. publish:(p)=> http.post('/cyzh-ldt/activity/submit',p),
  35. list:p => http.get("cyzh-ldt/app/shop/getActivity", {params:p}),
  36. //结束活动
  37. stop:(p)=> http.post('/cyzh-ldt/activity/updateBatch',p),
  38. //退出活动
  39. exit:(p)=> http.post('cyzh-ldt/activityjoinrecord/exitBatch',p),
  40. //参加活动
  41. join:(p)=> http.post('cyzh-ldt/activityjoinrecord/submit',p),
  42. //活动详情
  43. detail:p => http.get("/cyzh-ldt/activity/detail", {params:p}),
  44. }
  45. //用户银行
  46. const userBank={
  47. detail:p => http.get('cyzh-ldt/userbank/detail',{params:p}),
  48. list:p => http.get('cyzh-ldt/userbank/list',{params:p}),
  49. appList:p => http.get('cyzh-ldt/userbank/appList',{params:p}),
  50. submit:p => http.post('cyzh-ldt/userbank/submit', p),
  51. remove:p => http.post('cyzh-ldt/userbank/remove?ids='+p),
  52. }
  53. //accout
  54. const accout={
  55. register:p => http.post('cyzh-ldt/appaccount/shop/register',p),
  56. login:p => http.post('cyzh-ldt/appaccount/login',p),
  57. modifPaw:p => http.post('cyzh-ldt/appaccount/setPassword',p),
  58. forgetPaw:p => http.post('cyzh-ldt/appaccount/forgetPassword',p),
  59. }
  60. export const api={
  61. uploadFile,
  62. dict,
  63. sms,
  64. mall,
  65. shop,
  66. memberCenter,
  67. activity,
  68. accout
  69. }