api.js 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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. getGenerateScheme:p => http.get('/wx-app/getGenerateScheme', {params:p}),
  7. }
  8. //字典
  9. const dict=p => http.get('/blade-system/dict-biz/dictionary', {params:p})
  10. //文件上传
  11. const uploadFile =(p)=> http.upload('blade-resource/oss/endpoint/put-file', {name:'file',filePath:p})
  12. //活动管理
  13. const activity = {
  14. //音乐之声活动
  15. yyzs_list:p => http.get('yyzs/cyzh-activity/activity/selectPageWithTag', {params:p,custom: {yyzs: true}}),
  16. //商场活动
  17. list:p => http.get('cyzh-ldt/activity/list', {params:p}),
  18. }
  19. //用户管理
  20. const loginUser={
  21. detail:p => http.get('cyzh-ldt/loginuser/detail', {params:p}),
  22. submit:p => http.post('cyzh-ldt/loginuser/submit', p),
  23. login:p => http.post('cyzh-ldt/loginuser/login', p),
  24. payBefore:p => http.post('cyzh-ldt/loginuser/payBefore', p),
  25. payBeforeForNormal:p => http.post('cyzh-ldt/loginuser/payBeforeForNormal', p),
  26. getBillrecordFromRedis:p => http.get('cyzh-ldt/loginuser/getBillrecordFromRedis', {params:p}),
  27. clearBillRecordCache:p => http.get('cyzh-ldt/loginuser/clearBillRecordCache', {params:p}),
  28. }
  29. //商户管理
  30. const shop={
  31. list:p => http.get('cyzh-ldt/shop/list', {params:p}),
  32. detail:p => http.get('cyzh-ldt/shop/detail', {params:p}),
  33. }
  34. //商场管理
  35. const mall={
  36. //获取商场列表
  37. list:p => http.get('cyzh-ldt/mall/list',{params:p}),
  38. }
  39. //代理商
  40. const agenter={
  41. list:p => http.get('cyzh-ldt/agenter/list',{params:p}),
  42. submit:p => http.post('cyzh-ldt/agenter/submit', p),
  43. }
  44. //代理类型
  45. const agenterType={
  46. detail:p => http.get('cyzh-ldt/agentertype/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. //支付
  57. const pay={
  58. //wx支付
  59. payOrder:p => http.get('payment/payOrder/YEE_PAY/MINI_PROGRAM',{params:p}),
  60. //扫码支付
  61. payOrderOfscanCode:p => http.get('payment/payOrder/YEE_PAY/SCAN_CODE',{params:p}),
  62. }
  63. const billRecord={
  64. submit:p => http.post('cyzh-ldt/billrecord/submit', p),
  65. detail:p => http.get('cyzh-ldt/billrecord/detail', {params:p}),
  66. }
  67. const setting = {
  68. feedback: p => http.post('feedback/submit', p)
  69. }
  70. const account = {
  71. pointList:p => http.get('cyzh-ldt/loginuser/channeluserpoint/list',{params:p}),
  72. remainList:p => http.get('cyzh-ldt/loginuser/remaining/list',{params:p}),
  73. }
  74. //webSocket
  75. const webSocket={
  76. sendInfo:p => http.post('cyzh-ldt/webSocket/sendInfo',p),
  77. }
  78. export const api={
  79. wxApp,
  80. dict,
  81. uploadFile,
  82. activity,
  83. loginUser,
  84. shop,
  85. mall,
  86. agenter,
  87. agenterType,
  88. userBank,
  89. pay,
  90. billRecord,
  91. setting,
  92. account,
  93. webSocket
  94. }