实名认证页面功能对接

This commit is contained in:
dzl 2025-06-03 10:38:03 +08:00
parent b21681991d
commit 8afef8fff0

View File

@ -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);
};