api.js 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. const _my = require("../../__antmove/api/index.js")(my);
  2. const wx = _my;
  3. const { request_wxrlxf } = require("../func/request");
  4. // 人脸下发接口
  5. const doPass = data => {
  6. return request_wxrlxf({
  7. url: "/api/next/doGetFacePass",
  8. data: data,
  9. method: "get",
  10. type: "application/x-www-form-urlencoded"
  11. });
  12. };
  13. // 查询楼宇列表
  14. const getBuildingList = data => {
  15. return request_wxrlxf({
  16. url: "/api/buildingApi/getBuildingList",
  17. data: data,
  18. method: "get",
  19. type: "application/x-www-form-urlencoded"
  20. });
  21. };
  22. // 常客获取楼宇的设备列表(sn和name)
  23. const userWhiteGetSnList = data => {
  24. return request_wxrlxf({
  25. url: "/api/buildingApi/userWhiteGetSnList",
  26. data: data,
  27. method: "get",
  28. type: "application/x-www-form-urlencoded"
  29. });
  30. };
  31. // 根据访客记录Id获取记录
  32. const getVisitoryByUserVisitorListDetailId = data => {
  33. return request_wxrlxf({
  34. url: "/api/buildingApi/getVisitoryByUserVisitorListDetailId",
  35. data: data,
  36. method: "get",
  37. type: "application/x-www-form-urlencoded"
  38. });
  39. };
  40. // 常客邀请访客
  41. const userWhiteInviteUserVisitor = data => {
  42. return request_wxrlxf({
  43. url: "/api/buildingApi/alipay/userWhiteInviteUserVisitor",
  44. data: data,
  45. method: "post",
  46. type: "application/json"
  47. });
  48. };
  49. // 常客登记-查询楼宇内是否存在这个常客
  50. const userWhiteCheck = data => {
  51. return request_wxrlxf({
  52. url: "/api/buildingApi/userWhiteCheck",
  53. data: data,
  54. method: "post",
  55. type: "application/json"
  56. });
  57. };
  58. // 访客预约-查询手机号在该账号内是否是常客
  59. const getUserWhiteByphoneAndAdminId = data => {
  60. return request_wxrlxf({
  61. url: "/api/buildingApi/getUserWhiteByphoneAndAdminId",
  62. data: data,
  63. method: "post",
  64. type: "application/json"
  65. });
  66. };
  67. // 访客预约-提交拜访申请
  68. const visitorySubmit = data => {
  69. return request_wxrlxf({
  70. url: "/api/buildingApi/alipay/visitorySubmit",
  71. data: data,
  72. method: "post",
  73. type: "application/json"
  74. });
  75. };
  76. // 企业信息提交审核
  77. const companyCommit = data => {
  78. return request_wxrlxf({
  79. url: "/api/buildingApi/alipay/companyCommit",
  80. data: data,
  81. method: "post",
  82. type: "application/json"
  83. });
  84. };
  85. // 查询企业审核情况
  86. const companyCommitInfoList = data => {
  87. return request_wxrlxf({
  88. url: "/api/buildingApi/companyCommitInfoList",
  89. data: data,
  90. method: "get",
  91. type: "application/x-www-form-urlencoded"
  92. });
  93. };
  94. // 常客查询拜访记录列表
  95. const userWhiteVisitList = data => {
  96. return request_wxrlxf({
  97. url: "/api/buildingApi/userWhiteVisitList",
  98. data: data,
  99. method: "post",
  100. type: "application/json"
  101. });
  102. };
  103. // 访客查询拜访记录列表
  104. const visitoryVisitList = data => {
  105. return request_wxrlxf({
  106. url: "/api/buildingApi/visitoryVisitList",
  107. data: data,
  108. method: "post",
  109. type: "application/json"
  110. });
  111. };
  112. // 常客处理访客申请记录
  113. const userWhiteHandleVisitList = data => {
  114. return request_wxrlxf({
  115. url: "/api/buildingApi/alipay/userWhiteHandleVisitList",
  116. data: data,
  117. method: "post",
  118. type: "application/json"
  119. });
  120. };
  121. // 查看用户数据
  122. const getUserInfoVO = data => {
  123. return request_wxrlxf({
  124. url: "/api/appointmentApi/getUserInfoVO",
  125. data: data,
  126. method: "get",
  127. type: "application/x-www-form-urlencoded"
  128. });
  129. };
  130. // 营业执照OCR数据获取
  131. const getOCRDetail = data => {
  132. return request_wxrlxf({
  133. url: "/api/buildingApi/getOCRDetail",
  134. data: data,
  135. method: "get",
  136. type: "application/x-www-form-urlencoded"
  137. });
  138. };
  139. // 常客查看公司信息
  140. const userWhiteLookCompanyInfo = data => {
  141. return request_wxrlxf({
  142. url: "/api/buildingApi/userWhiteLookCompanyInfo",
  143. data: data,
  144. method: "get",
  145. type: "application/x-www-form-urlencoded"
  146. });
  147. };
  148. // 查询公司列表
  149. const getCompanyList = data => {
  150. return request_wxrlxf({
  151. url: "/api/buildingApi/getCompanyList",
  152. data: data,
  153. method: "get",
  154. type: "application/x-www-form-urlencoded"
  155. });
  156. };
  157. // 通过公司Id查询楼宇和公司信息
  158. const getBuildingAndCompanyInfo = adminId => {
  159. return request_wxrlxf({
  160. url: "/api/buildingApi/getBuildingAndCompanyInfo",
  161. data: {
  162. adminId: adminId
  163. },
  164. method: "get",
  165. type: "application/x-www-form-urlencoded"
  166. });
  167. };
  168. // 校验此常客白名单id是否有效
  169. const checkUserWhiteListId = userWhiteListId => {
  170. return request_wxrlxf({
  171. url: "/api/buildingApi/checkUserWhiteListId",
  172. data: {
  173. userWhiteListId: userWhiteListId
  174. },
  175. method: "get",
  176. type: "application/x-www-form-urlencoded"
  177. });
  178. };
  179. // 访客下发
  180. const visitoryDownFaceAgain = data => {
  181. return request_wxrlxf({
  182. url: "/api/buildingApi/visitoryDownFaceAgain",
  183. data: data,
  184. method: "get",
  185. type: "application/json"
  186. });
  187. };
  188. // 获取访客qrcodeId
  189. const getVisitorQrcodeId = data => {
  190. return request_wxrlxf({
  191. url: "/api/buildingApi/getVisitorQrcodeId",
  192. data: data,
  193. method: "post",
  194. type: "application/json"
  195. });
  196. };
  197. module.exports = {
  198. doPass,
  199. userWhiteGetSnList,
  200. getBuildingList,
  201. getVisitoryByUserVisitorListDetailId,
  202. userWhiteInviteUserVisitor,
  203. userWhiteCheck,
  204. getUserWhiteByphoneAndAdminId,
  205. visitorySubmit,
  206. companyCommit,
  207. companyCommitInfoList,
  208. userWhiteVisitList,
  209. userWhiteHandleVisitList,
  210. getUserInfoVO,
  211. getOCRDetail,
  212. visitoryVisitList,
  213. userWhiteLookCompanyInfo,
  214. getCompanyList,
  215. getBuildingAndCompanyInfo,
  216. checkUserWhiteListId,
  217. visitoryDownFaceAgain,
  218. getVisitorQrcodeId
  219. };