index.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. const _my = require("../../__antmove/api/index.js")(my);
  2. const wx = _my;
  3. //若填写的身份证号为330821199603150212,则直接进入rlxf_pass界面并携带填写的姓名,身份证号和手机号
  4. const weixinTestFuncAdmin = ({
  5. inputName,
  6. inputIdcard,
  7. phoneNumber,
  8. orgId
  9. }) => {
  10. if (inputIdcard == "330821199603150212") {
  11. my.alert({
  12. title: "提示",
  13. content: "登录成功!",
  14. success() {
  15. wx.reLaunch({
  16. url: `/pages/wx_airport/rlxf_pass/rlxf_pass?name=${inputName}&idNumber=${inputIdcard}&phone=${phoneNumber}`
  17. });
  18. }
  19. });
  20. return true;
  21. } else {
  22. return false;
  23. }
  24. };
  25. //解除未扫码进入的限制
  26. const weixinTestFuncSloveOrgId = function(inputIdcard) {
  27. if (inputIdcard == "330821199603150212") {
  28. this.setData({
  29. disableSubmit: true
  30. });
  31. } else {
  32. console.log("00");
  33. }
  34. };
  35. //创建一个虚拟的userInfo信息
  36. const weixinTestMakeUserInfo = function(name, phone, idNumber) {
  37. let userInfoTest = {
  38. username: name,
  39. phone: phone,
  40. idNumber: idNumber,
  41. org: "公司试验区",
  42. createTime: "2023-04-15 20:16:00"
  43. };
  44. return userInfoTest;
  45. };
  46. module.exports = {
  47. weixinTestFuncAdmin,
  48. weixinTestFuncSloveOrgId,
  49. weixinTestMakeUserInfo
  50. };