index.js 1.2 KB

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