customField.js 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. const {
  2. request_wxrlxf
  3. } = require("../func/request")
  4. const doPass = (data) => {
  5. return request_wxrlxf({
  6. url: '/api/next/doGetFacePass',
  7. data: data,
  8. method: 'get',
  9. type: 'application/x-www-form-urlencoded'
  10. })
  11. }
  12. //获取是否有自定义字段
  13. const getContextByAdminId = (orgId) => {
  14. return request_wxrlxf({
  15. url: '/api/next/getContextByAdminId',
  16. data: {
  17. adminId: orgId
  18. },
  19. method: 'get',
  20. type: 'application/x-www-form-urlencoded'
  21. })
  22. }
  23. //获取用户填写的自定义字段内容
  24. const selectContextByCardId = (orgId, userId) => {
  25. return request_wxrlxf({
  26. url: '/api/next/selectContextByCardId',
  27. data: {
  28. adminId: orgId,
  29. id: userId
  30. },
  31. method: 'get',
  32. type: 'application/x-www-form-urlencoded'
  33. })
  34. }
  35. //提交自定义字段填写结果
  36. const InsertContentByCardId = (data) => {
  37. return request_wxrlxf({
  38. url: '/api/next/InsertContentByCardId',
  39. data: data,
  40. method: 'post',
  41. type: 'application/json'
  42. })
  43. }
  44. //获得省份列表
  45. const getProvince = () => {
  46. return request_wxrlxf({
  47. url: '/api/next/getProvince',
  48. data: {},
  49. method: 'get',
  50. type: 'application/x-www-form-urlencoded'
  51. })
  52. }
  53. //获得城市列表
  54. const getCity = (areaCodeId) => {
  55. return request_wxrlxf({
  56. url: '/api/next/getCity',
  57. data: {
  58. areaCodeId
  59. },
  60. method: 'get',
  61. type: 'application/x-www-form-urlencoded'
  62. })
  63. }
  64. //获得区县列表
  65. const getArea = (areaCodeId) => {
  66. return request_wxrlxf({
  67. url: '/api/next/getArea',
  68. data: {
  69. areaCodeId
  70. },
  71. method: 'get',
  72. type: 'application/x-www-form-urlencoded'
  73. })
  74. }
  75. //获得街道列表
  76. const getStreet = (areaCodeId) => {
  77. return request_wxrlxf({
  78. url: '/api/next/getStreet',
  79. data: {
  80. areaCodeId
  81. },
  82. method: 'get',
  83. type: 'application/x-www-form-urlencoded'
  84. })
  85. }
  86. module.exports = {
  87. doPass,
  88. getContextByAdminId,
  89. selectContextByCardId,
  90. InsertContentByCardId,
  91. getProvince,
  92. getCity,
  93. getArea,
  94. getStreet
  95. }