diff --git a/ebike-user/pages/user/views/IdentityVerification.vue b/ebike-user/pages/user/views/IdentityVerification.vue index 3e65c8f..4ca40a6 100644 --- a/ebike-user/pages/user/views/IdentityVerification.vue +++ b/ebike-user/pages/user/views/IdentityVerification.vue @@ -6,12 +6,14 @@ - + - - + + @@ -34,32 +36,43 @@ showModelMessage } from '@/utils/tools.js'; import config from '@/utils/config'; - + import { + onLoad + } from '@dcloudio/uni-app'; const imgPath = config.imgPath; const isloading = ref(false); const name = ref(''); // 用于存储姓名 const idCard = ref(''); // 用于存储身份证号 const countdown = ref(60); // 设置倒计时时间为60秒 + const onLoadData = ref({}) + onLoad((options) => { + if (options['number']) { + onLoadData.value['number'] = options['number'] + onLoadData.value['_tbScancodeApproach_'] = options['_tbScancodeApproach_'] + } + }) const phonelogin = async () => { if (!name.value || !idCard.value) { showModelMessage('姓名和身份证号不能为空'); return; - } + } const idCardRegex = /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))((0[1-9])|([12][0-9])|(3[01]))\d{3}(\d|X)$/; // 身份证号正则表达式 if (!idCardRegex.test(idCard.value)) { showModelMessage('请输入有效的身份证号'); return; - } + } // 如果验证通过,发起认证请求 isloading.value = true; setTimeout(() => { isloading.value = false; // 假设成功认证后跳转 uni.navigateTo({ - url: "/pages/user/home/home" + url: "/pages/user/home/home?number=" + onLoadData.value['number'] + + "&_tbScancodeApproach_=" + onLoadData.value[ + '_tbScancodeApproach_'] }); }, 1000); };