auth_api.js 935 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. const { request_wxrlxf, wx_rlxf } = require("../func/request");
  2. const base_url = wx_rlxf ? 'https://tx.hz-hanghui.com:8088/hanghui-server-platform/api/v1/alipay/' : 'http://192.168.11.11:8081/hanghui-server-platform/api/v1/alipay/'
  3. // 校验token是否有权限调用
  4. const tokenCheck = token => {
  5. return request_wxrlxf({
  6. url: `${base_url}token/${token}/check`,
  7. method: "post",
  8. type: "application/x-www-form-urlencoded"
  9. })
  10. }
  11. // 推送用户三要素信息
  12. const pushThree = data => {
  13. return request_wxrlxf({
  14. url: `${base_url}user/push`,
  15. method: "post",
  16. type: "application/json",
  17. data
  18. })
  19. }
  20. // 根据三要素获取访客二维码生成
  21. const visitorQrCode = data => {
  22. return request_wxrlxf({
  23. url: '/api/v1/fkj/visitor/qrCode',
  24. method: "post",
  25. type: "application/json",
  26. data
  27. })
  28. }
  29. module.exports = {
  30. tokenCheck,
  31. pushThree,
  32. visitorQrCode
  33. }