api.js 3.0 KB

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