api.js 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. import {http} from './service.js'
  2. //微信api
  3. const wxApp={
  4. getOpenId:p => http.get('/wx-app/getOpenId', {params:p}),
  5. getOpenData:p => http.post('/wx-app/getOpenData',p),
  6. }
  7. //字典
  8. const dict=p => http.get('/blade-system/dict-biz/dictionary', {params:p})
  9. //文件上传
  10. let uploadFileUrl='/upload/putfile'
  11. const uploadFile={
  12. submit:p => http.upload(uploadFileUrl, {name:'file',filePath:p}),
  13. }
  14. //活动管理
  15. const activity = {
  16. list:p => http.get('yyzs/cyzh-activity/activity/selectPageWithTag', {params:p,custom: {yyzs: true}}),
  17. }
  18. //用户管理
  19. const loginUser={
  20. detail:p => http.get('cyzh-ldt/loginuser/detail', {params:p}),
  21. submit:p => http.post('cyzh-ldt/loginuser/submit', p),
  22. login:p => http.post('cyzh-ldt/loginuser/login', p),
  23. }
  24. //商户管理
  25. const shop={
  26. list:p => http.get('cyzh-ldt/shop/list', {params:p}),
  27. }
  28. //商场管理
  29. const mall={
  30. //获取商场列表
  31. list:p => http.get('cyzh-ldt/mall/list',{params:p}),
  32. }
  33. //代理商
  34. const agenter={
  35. list:p => http.get('cyzh-ldt/agenter/list',{params:p}),
  36. submit:p => http.post('cyzh-ldt/agenter/submit', p),
  37. }
  38. //代理类型
  39. const agenterType={
  40. detail:p => http.get('cyzh-ldt/agentertype/detail',{params:p}),
  41. }
  42. //用户银行
  43. const userBank={
  44. detail:p => http.get('cyzh-ldt/userbank/detail',{params:p}),
  45. list:p => http.get('cyzh-ldt/userbank/list',{params:p}),
  46. appList:p => http.get('cyzh-ldt/userbank/appList',{params:p}),
  47. submit:p => http.post('cyzh-ldt/userbank/submit', p),
  48. remove:p => http.post('cyzh-ldt/userbank/remove?ids='+p),
  49. }
  50. //支付
  51. const pay={
  52. payOrder:p => http.get('payment/payOrder/YEE_PAY/SCAN_CODE',{params:p}),
  53. }
  54. const billRecord={
  55. submit:p => http.post('cyzh-ldt/billrecord/submit', p),
  56. }
  57. export const api={
  58. wxApp,
  59. dict,
  60. uploadFile,
  61. activity,
  62. loginUser,
  63. shop,
  64. mall,
  65. agenter,
  66. agenterType,
  67. userBank,
  68. pay,
  69. billRecord
  70. }