wjxxy.js 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. // import http from '@/http/api.js'
  2. import base64 from '@/utils/base64.js'
  3. import http from './api.js'
  4. export const getrequest = (className, methodName) => {
  5. return http.request({
  6. url: '/zf/request',
  7. method: 'POST',
  8. data: {
  9. "className": className,
  10. "methodName": methodName,
  11. "params": {
  12. "current": "1",
  13. "size": "10"
  14. }
  15. }
  16. })
  17. }
  18. // 办事指南列表
  19. export const bsznList = () => {
  20. return http.request({
  21. url: '/zf/request',
  22. method: 'POST',
  23. data: {
  24. "className": 'dictBsznController',
  25. "methodName": 'bsznList',
  26. "params": {}
  27. }
  28. });
  29. };
  30. // export const bsznList = () => {
  31. // return http.request({
  32. // url: '/api/dictBszn/bsznList',
  33. // method: 'get',
  34. // });
  35. // };
  36. // 根据id查看详情
  37. export const detailById = (id) => {
  38. return http.request({
  39. url: '/zf/request',
  40. method: 'post',
  41. data: {
  42. "className": 'dictBsznController',
  43. "methodName": 'detailById',
  44. "params": {
  45. "id": id
  46. }
  47. }
  48. });
  49. };
  50. // export const detailById = (id) => {
  51. // return http.request({
  52. // url: '/api/dictBszn/detailById',
  53. // method: 'get',
  54. // params: {
  55. // id
  56. // }
  57. // });
  58. // };
  59. // 根据事项名称模糊搜索
  60. export const selectListByMc = (dictValue) => {
  61. return http.request({
  62. // url: '/api/dictBszn/selectListByMc',
  63. url: '/zf/request',
  64. method: 'post',
  65. data: {
  66. "className": 'dictBsznController',
  67. "methodName": 'selectListByMc',
  68. "params": {
  69. "dictValue": dictValue
  70. }
  71. }
  72. // params: {
  73. // dictValue
  74. // }
  75. });
  76. };
  77. export const login = (tenantId, username, password, type) => {
  78. return http.request({
  79. url: '/api/blade-auth/oauth/token',
  80. method: 'POST',
  81. header: {
  82. 'Tenant-Id': tenantId,
  83. 'Blade-Requested-With': 'BladeHttpRequest',
  84. },
  85. params: {
  86. tenantId,
  87. username,
  88. password,
  89. grant_type: "password",
  90. scope: "all",
  91. type
  92. }
  93. })
  94. }