api.js 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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. const uploadFile =(p)=> http.upload('blade-resource/oss/endpoint/put-file', {name:'file',filePath:p})
  11. //活动管理
  12. const activity = {
  13. //音乐之声活动
  14. yyzs_list:p => http.get('yyzs/cyzh-activity/activity/selectPageWithTag', {params:p,custom: {yyzs: true}}),
  15. //商场活动
  16. list:p => http.get('cyzh-ldt/activity/list', {params:p}),
  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. payBefore:p => http.post('cyzh-ldt/loginuser/payBefore', p),
  24. payBeforeForNormal:p => http.post('cyzh-ldt/loginuser/payBeforeForNormal', p),
  25. getBillrecordFromRedis:p => http.get('cyzh-ldt/loginuser/getBillrecordFromRedis', {params:p}),
  26. clearBillRecordCache:p => http.get('cyzh-ldt/loginuser/clearBillRecordCache', {params:p}),
  27. }
  28. //商户管理
  29. const shop={
  30. list:p => http.get('cyzh-ldt/shop/list', {params:p}),
  31. detail:p => http.get('cyzh-ldt/shop/detail', {params:p}),
  32. }
  33. //商场管理
  34. const mall={
  35. //获取商场列表
  36. list:p => http.get('cyzh-ldt/mall/list',{params:p}),
  37. }
  38. //代理商
  39. const agenter={
  40. list:p => http.get('cyzh-ldt/agenter/list',{params:p}),
  41. submit:p => http.post('cyzh-ldt/agenter/submit', p),
  42. }
  43. //代理类型
  44. const agenterType={
  45. detail:p => http.get('cyzh-ldt/agentertype/detail',{params:p}),
  46. }
  47. //用户银行
  48. const userBank={
  49. detail:p => http.get('cyzh-ldt/userbank/detail',{params:p}),
  50. list:p => http.get('cyzh-ldt/userbank/list',{params:p}),
  51. appList:p => http.get('cyzh-ldt/userbank/appList',{params:p}),
  52. submit:p => http.post('cyzh-ldt/userbank/submit', p),
  53. remove:p => http.post('cyzh-ldt/userbank/remove?ids='+p),
  54. }
  55. //支付
  56. const pay={
  57. //wx支付
  58. payOrder:p => http.get('payment/payOrder/YEE_PAY/MINI_PROGRAM',{params:p}),
  59. //扫码支付
  60. payOrderOfscanCode:p => http.get('payment/payOrder/YEE_PAY/SCAN_CODE',{params:p}),
  61. }
  62. const billRecord={
  63. submit:p => http.post('cyzh-ldt/billrecord/submit', p),
  64. detail:p => http.get('cyzh-ldt/billrecord/detail', {params:p}),
  65. }
  66. const setting = {
  67. feedback: p => http.post('feedback/submit', p)
  68. }
  69. const account = {
  70. pointList:p => http.get('cyzh-ldt/loginuser/channeluserpoint/list',{params:p}),
  71. remainList:p => http.get('cyzh-ldt/loginuser/remaining/list',{params:p}),
  72. }
  73. export const api={
  74. wxApp,
  75. dict,
  76. uploadFile,
  77. activity,
  78. loginUser,
  79. shop,
  80. mall,
  81. agenter,
  82. agenterType,
  83. userBank,
  84. pay,
  85. billRecord,
  86. setting,
  87. account
  88. }