api.js 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  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. // 实名认证方式:返回1-老 2-新
  87. const realAuthenticationType = (data) => {
  88. return request_wxrlxf({
  89. url: '/api/next/realAuthenticationType',
  90. data,
  91. method: 'post',
  92. type: 'application/json'
  93. })
  94. }
  95. // 实名认证方式:新
  96. const doConfirmFaceNotifyNew = (data) => {
  97. return request_wxrlxf({
  98. url: '/api/next/doConfirmFaceNotifyNew',
  99. data,
  100. method: 'post',
  101. type: 'application/json'
  102. })
  103. }
  104. // 用户信息录入常客-访客表
  105. const userInfoInsert = (data) => {
  106. return request_wxrlxf({
  107. url: '/api/next/userInfoInsert',
  108. data,
  109. method: 'post',
  110. type: 'application/json'
  111. })
  112. }
  113. // 获取账号的配置信息
  114. const getAdminConfig = (adminId) => {
  115. return request_wxrlxf({
  116. url: '/api/next/getAdminConfig',
  117. data: {
  118. adminId
  119. },
  120. method: 'get',
  121. type: 'application/x-www-form-urlencoded'
  122. })
  123. }
  124. // 卡号认证-通过卡号获取用户信息
  125. // const getUserWhiteByCardIdEx = (data) => {
  126. // return request_wxrlxf({
  127. // url: '/api/next/getUserWhiteByCardIdEx',
  128. // data,
  129. // method: 'post',
  130. // type: 'application/json'
  131. // })
  132. // }
  133. // 卡号认证-通过卡号获取用户信息
  134. const getPicture = (data) => {
  135. return request_wxrlxf({
  136. url: '/upload/getPicture',
  137. data,
  138. method: 'post',
  139. type: 'application/json'
  140. })
  141. }
  142. //获取管理员信息
  143. const getAdminInfoById = (orgId) => {
  144. return request_wxrlxf({
  145. url: '/api/admin/getAdminInfoById',
  146. data: {
  147. adminId: orgId,
  148. },
  149. method: 'get',
  150. type: 'application/x-www-form-urlencoded'
  151. })
  152. }
  153. // 用户OpenId填入
  154. const openIdSet = (data) => {
  155. return request_wxrlxf({
  156. url: '/api/next/openIdSet',
  157. data,
  158. method: 'post',
  159. type: 'application/json'
  160. })
  161. }
  162. // 物理卡号填入
  163. const cardIdExSet = (data) => {
  164. return request_wxrlxf({
  165. url: '/api/next/cardIdExSet',
  166. data,
  167. method: 'post',
  168. type: 'application/json'
  169. })
  170. }
  171. // ----------------------访客机接口---------------------------------
  172. //更新访客机用户
  173. const updateVisitDeviceUser = (data) => {
  174. return request_wxrlxf({
  175. url: '/api/next/updateVisitDeviceUser',
  176. data,
  177. method: 'post',
  178. type: 'application/json'
  179. })
  180. }
  181. module.exports = {
  182. doPass,
  183. getContextByAdminId,
  184. selectContextByCardId,
  185. InsertContentByCardId,
  186. getProvince,
  187. getCity,
  188. getArea,
  189. getStreet,
  190. realAuthenticationType,
  191. doConfirmFaceNotifyNew,
  192. userInfoInsert,
  193. getAdminConfig,
  194. // getUserWhiteByCardIdEx,
  195. getPicture,
  196. getAdminInfoById,
  197. updateVisitDeviceUser,
  198. openIdSet,
  199. cardIdExSet,
  200. }