You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
<template>
|
|
|
|
<view class="phone">
|
|
|
|
<view class="titlle">身份证:</view>
|
|
|
|
<view class="phone-bd">
|
|
|
|
<view class="item">
|
|
|
|
<view class="txt">姓名</view>
|
|
|
|
<input v-model="realName" placeholder="请输入本人姓名" type="text" />
|
|
|
|
</view>
|
|
|
|
<view class="item">
|
|
|
|
<view class="txt">证件号</view>
|
|
|
|
<input v-model="idCard" maxlength="18" placeholder="请输入18位居民身份证号码" type="text" />
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="phone-fd">
|
|
|
|
<view class="btn" @click="toNext">确定</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import permision from "@/js_sdk/wa-permission/permission.js"
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
realName: "",
|
|
|
|
idCard: "",
|
|
|
|
};
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
async toNext() {
|
|
|
|
const that = this;
|
|
|
|
if(!that.realName){
|
|
|
|
uni.showToast({
|
|
|
|
icon: "none",
|
|
|
|
position: "bottom",
|
|
|
|
title: "姓名不能为空!",
|
|
|
|
})
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if(!that.idCard){
|
|
|
|
uni.showToast({
|
|
|
|
icon: "none",
|
|
|
|
position: "bottom",
|
|
|
|
title: "身份证号码不能为空!",
|
|
|
|
})
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// #ifdef APP-PLUS
|
|
|
|
if (uni.getSystemInfoSync().platform === "android") {
|
|
|
|
const res1 = await permision.requestAndroidPermission(
|
|
|
|
"android.permission.CAMERA"
|
|
|
|
);
|
|
|
|
if(res1==1){
|
|
|
|
uni.navigateTo({
|
|
|
|
url: "/pages/users/renzheng/camera?realName="+this.realName+"&idCard="+this.idCard
|
|
|
|
})
|
|
|
|
}
|
|
|
|
return ;
|
|
|
|
}
|
|
|
|
// #endif
|
|
|
|
uni.navigateTo({
|
|
|
|
url: "/pages/users/renzheng/camera?realName="+this.realName+"&idCard="+this.idCard
|
|
|
|
})
|
|
|
|
return ;
|
|
|
|
},
|
|
|
|
//去登录
|
|
|
|
async toReg(token) {
|
|
|
|
const {code, data, msg} = await this.$api.realNameAuth({
|
|
|
|
userId: uni.getStorageSync("userInfo").id,
|
|
|
|
realName: this.realName,
|
|
|
|
idCard: this.idCard,
|
|
|
|
token
|
|
|
|
})
|
|
|
|
if(code == 200){
|
|
|
|
uni.showToast({
|
|
|
|
title: "提交成功"
|
|
|
|
})
|
|
|
|
setTimeout(()=>{
|
|
|
|
uni.navigateBack({
|
|
|
|
delta: 1
|
|
|
|
})
|
|
|
|
},2000)
|
|
|
|
}else{
|
|
|
|
uni.showToast({
|
|
|
|
icon: "none",
|
|
|
|
position: "bottom",
|
|
|
|
title: msg
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
.phone{
|
|
|
|
padding: 25rpx;
|
|
|
|
overflow: hidden;
|
|
|
|
.title{
|
|
|
|
color: #222222;
|
|
|
|
font-weight: 500;
|
|
|
|
font-size: 30rpx;
|
|
|
|
}
|
|
|
|
.tips{
|
|
|
|
font-weight: 500;
|
|
|
|
font-size: 24rpx;
|
|
|
|
color: #999999;
|
|
|
|
margin-top: 20rpx;
|
|
|
|
}
|
|
|
|
&-fd{
|
|
|
|
width: 100%;
|
|
|
|
position: fixed;
|
|
|
|
left: 0;
|
|
|
|
bottom: 50rpx;
|
|
|
|
z-index: 22;
|
|
|
|
.btn{
|
|
|
|
width: 700rpx;
|
|
|
|
line-height: 98rpx;
|
|
|
|
background: linear-gradient(0deg, #000000, #3D3B38);
|
|
|
|
border-radius: 98rpx;
|
|
|
|
font-weight: 400;
|
|
|
|
font-size: 34rpx;
|
|
|
|
text-align: center;
|
|
|
|
color: #FFFFFF;
|
|
|
|
margin: 0 auto;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
&-bd{
|
|
|
|
width: 100%;
|
|
|
|
overflow: hidden;
|
|
|
|
background: #FFFFFF;
|
|
|
|
padding: 0 30rpx;
|
|
|
|
box-sizing: border-box;
|
|
|
|
border-radius: 20rpx;
|
|
|
|
margin-top: 30rpx;
|
|
|
|
.item{
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
border-top: 1px solid #EAEAEA;
|
|
|
|
padding: 50rpx 0 30rpx;
|
|
|
|
&:first-child{
|
|
|
|
border-top-color: #FFFFFF;
|
|
|
|
}
|
|
|
|
input{
|
|
|
|
flex: 1;
|
|
|
|
font-weight: 400;
|
|
|
|
font-size: 30rpx;
|
|
|
|
color: #333;
|
|
|
|
margin-left: 30rpx;
|
|
|
|
}
|
|
|
|
.code{
|
|
|
|
width: 170rpx;
|
|
|
|
line-height: 60rpx;
|
|
|
|
background: #000000;
|
|
|
|
border-radius: 60rpx;
|
|
|
|
text-align: center;
|
|
|
|
font-weight: 500;
|
|
|
|
font-size: 26rpx;
|
|
|
|
color: #FFFFFF;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|