实名认证页面功能对接
This commit is contained in:
parent
b21681991d
commit
8afef8fff0
@ -6,12 +6,14 @@
|
||||
<view class="input-fields padding">
|
||||
<!-- 输入姓名 -->
|
||||
<view class="input-item flex align-center">
|
||||
<text class="cuIcon-peoplefill" style="font-size: 20px; color: rgb(173,173,175);margin-right: 10px;"></text>
|
||||
<text class="cuIcon-peoplefill"
|
||||
style="font-size: 20px; color: rgb(173,173,175);margin-right: 10px;"></text>
|
||||
<input v-model="name" placeholder="请输入姓名" />
|
||||
</view>
|
||||
<!-- 输入身份证号 -->
|
||||
<view class="input-item flex align-center">
|
||||
<text class="cuIcon-card lg text-gray" style="font-size: 20px; color: rgb(173,173,175);margin-right: 10px;"></text>
|
||||
<view class="input-item flex align-center">
|
||||
<text class="cuIcon-card lg text-gray"
|
||||
style="font-size: 20px; color: rgb(173,173,175);margin-right: 10px;"></text>
|
||||
<input v-model="idCard" placeholder="请输入身份证号" />
|
||||
</view>
|
||||
<!-- 登录按钮 -->
|
||||
@ -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);
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user