api.js 2.7 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. const platform = {
  5. getPlatformParams: p => http.get('/app/platformsetting/getPlatformValueByList', {params:p}),
  6. }
  7. const activity = {
  8. getWorksList: p => http.get('/app/active/product/sortList', {params:p}),
  9. sortListQuery: p => http.get('/app/active/product/sortListQuery', {params:p}),
  10. searchWork: p => http.get('/app/active/product/search', {params:{keyword: p}}),
  11. getWorksDetail: id => http.get('/sing_active/activeproductrecord/detail', {params:{id}}),
  12. list: p => http.get('/sing_active/activeproductrecord/list', {params:p}),
  13. getGiftList: p => http.get('/sing_goods/helpgoods/list', {params:p}),
  14. getMyTotalHeat:p => http.get('/sing_active/activeproductrecord/getMyTotalHeat', {params:p}),
  15. }
  16. //微信api
  17. const wxApp={
  18. getOpenId:p => http.get('/wx-app/getOpenId', {params:p}),
  19. getOpenData:p => http.post('/wx-app/getOpenData',p),
  20. getGenerateScheme: p => http.get('/wx-app/getGenerateScheme', {
  21. params: p
  22. }),
  23. }
  24. //字典
  25. const dict={
  26. list:p => http.get('/blade-system/dict-biz/dictionary', {params:p}),
  27. parentList:p => http.get('/blade-system/dict-biz/parent-list', {params:p}),
  28. dictionaryTree:p => http.get('/blade-system/dict-biz/dictionary-tree', {params:p}),
  29. }
  30. const loginUser={
  31. list:p => http.get('ldt_user/loginuser/list', {params:p}),
  32. submit:p => http.post('sing_user/loginuser/submit', p),
  33. login:p => http.post('/user/login/login', p),
  34. detail:p => http.get('sing_user/loginuser/detail', {params:p}),
  35. }
  36. const CMCC={
  37. isCMCC:p => http.get('/user/login/isCMCC', {params:p}),
  38. queryCmccPoint:p => http.post('app/cmcc/queryCmccPoint'+p),
  39. }
  40. const points={
  41. list:p => http.get('sing_point/pointrecord/list', {params:p}),
  42. }
  43. //我的助力
  44. const help={
  45. list:p => http.get('sing_active/activehelprecord/list', {params:p}),
  46. }
  47. //热力明细
  48. const heatrecord={
  49. list:p => http.get('sing_heat_value/heatrecord/list', {params:p}),
  50. }
  51. /**
  52. * 积分商城
  53. */
  54. const pointgoods={
  55. list:p => http.get('sing_goods/pointgoods/list', {params:p}),
  56. }
  57. /**
  58. * 道具
  59. */
  60. const order={
  61. sendCmccSms:p => http.post('/app/help/goods/sendCmccSms',p,{header:{'Content-Type':'application/x-www-form-urlencoded'}}),
  62. create:p => http.post('/app/help/goods/createPropsOrder',p,{header:{'Content-Type':'application/x-www-form-urlencoded'}}),
  63. exchange:p => http.post('/app/help/goods/exchangeProps',p,{header:{'Content-Type':'application/x-www-form-urlencoded'}}),
  64. }
  65. /**
  66. * 用户地址
  67. */
  68. const address={
  69. list:p => http.get('sing_user/useraddress/list', {params:p}),
  70. }
  71. export const api={
  72. uploadFile,
  73. dict,
  74. wxApp,
  75. loginUser,
  76. activity,
  77. platform,
  78. points,
  79. help,
  80. heatrecord,
  81. CMCC,
  82. pointgoods,
  83. order,
  84. address
  85. }