customField.js 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. const _my = require("../../__antmove/api/index.js")(my);
  2. const wx = _my;
  3. const { request_wxrlxf } = 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. };