实名认证页面功能对接
This commit is contained in:
parent
b21681991d
commit
8afef8fff0
@ -6,12 +6,14 @@
|
|||||||
<view class="input-fields padding">
|
<view class="input-fields padding">
|
||||||
<!-- 输入姓名 -->
|
<!-- 输入姓名 -->
|
||||||
<view class="input-item flex align-center">
|
<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="请输入姓名" />
|
<input v-model="name" placeholder="请输入姓名" />
|
||||||
</view>
|
</view>
|
||||||
<!-- 输入身份证号 -->
|
<!-- 输入身份证号 -->
|
||||||
<view class="input-item flex align-center">
|
<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>
|
<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="请输入身份证号" />
|
<input v-model="idCard" placeholder="请输入身份证号" />
|
||||||
</view>
|
</view>
|
||||||
<!-- 登录按钮 -->
|
<!-- 登录按钮 -->
|
||||||
@ -34,32 +36,43 @@
|
|||||||
showModelMessage
|
showModelMessage
|
||||||
} from '@/utils/tools.js';
|
} from '@/utils/tools.js';
|
||||||
import config from '@/utils/config';
|
import config from '@/utils/config';
|
||||||
|
import {
|
||||||
|
onLoad
|
||||||
|
} from '@dcloudio/uni-app';
|
||||||
const imgPath = config.imgPath;
|
const imgPath = config.imgPath;
|
||||||
|
|
||||||
const isloading = ref(false);
|
const isloading = ref(false);
|
||||||
const name = ref(''); // 用于存储姓名
|
const name = ref(''); // 用于存储姓名
|
||||||
const idCard = ref(''); // 用于存储身份证号
|
const idCard = ref(''); // 用于存储身份证号
|
||||||
const countdown = ref(60); // 设置倒计时时间为60秒
|
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 () => {
|
const phonelogin = async () => {
|
||||||
if (!name.value || !idCard.value) {
|
if (!name.value || !idCard.value) {
|
||||||
showModelMessage('姓名和身份证号不能为空');
|
showModelMessage('姓名和身份证号不能为空');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const idCardRegex =
|
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)$/; // 身份证号正则表达式
|
/^[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)) {
|
if (!idCardRegex.test(idCard.value)) {
|
||||||
showModelMessage('请输入有效的身份证号');
|
showModelMessage('请输入有效的身份证号');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 如果验证通过,发起认证请求
|
// 如果验证通过,发起认证请求
|
||||||
isloading.value = true;
|
isloading.value = true;
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
isloading.value = false;
|
isloading.value = false;
|
||||||
// 假设成功认证后跳转
|
// 假设成功认证后跳转
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/user/home/home"
|
url: "/pages/user/home/home?number=" + onLoadData.value['number'] +
|
||||||
|
"&_tbScancodeApproach_=" + onLoadData.value[
|
||||||
|
'_tbScancodeApproach_']
|
||||||
});
|
});
|
||||||
}, 1000);
|
}, 1000);
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user