连云港陪玩陪聊
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.
chunwan/pages/users/renzheng/shiming.vue

165 lines
3.2 KiB

3 months ago
<template>
<view class="phone">
<view class="titlle">身份证</view>
<view class="phone-bd">
<view class="item">
<view class="txt">姓名</view>
2 months ago
<input v-model="realName" placeholder="请输入本人姓名" type="text" />
3 months ago
</view>
<view class="item">
<view class="txt">证件号</view>
2 months ago
<input v-model="idCard" maxlength="18" placeholder="请输入18位居民身份证号码" type="text" />
3 months ago
</view>
</view>
<view class="phone-fd">
2 months ago
<view class="btn" @click="toNext">确定</view>
3 months ago
</view>
</view>
</template>
<script>
1 month ago
import permision from "@/js_sdk/wa-permission/permission.js"
3 months ago
export default {
data() {
return {
2 months ago
realName: "",
idCard: "",
3 months ago
};
},
methods: {
1 month ago
async toNext() {
2 months ago
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
}
1 month ago
// #ifdef APP-PLUS
if (uni.getSystemInfoSync().platform === "android") {
4 weeks ago
const res1 = await permision.requestAndroidPermission(
1 month ago
"android.permission.CAMERA"
);
if(res1==1){
uni.navigateTo({
url: "/pages/users/renzheng/camera?realName="+this.realName+"&idCard="+this.idCard
})
}
return ;
}
// #endif
4 weeks ago
uni.navigateTo({
url: "/pages/users/renzheng/camera?realName="+this.realName+"&idCard="+this.idCard
1 month ago
})
return ;
2 months ago
},
//去登录
1 month ago
async toReg(token) {
2 months ago
const {code, data, msg} = await this.$api.realNameAuth({
userId: uni.getStorageSync("userInfo").id,
realName: this.realName,
idCard: this.idCard,
1 month ago
token
2 months ago
})
if(code == 200){
uni.showToast({
title: "提交成功"
})
setTimeout(()=>{
uni.navigateBack({
delta: 1
})
},2000)
}else{
uni.showToast({
icon: "none",
position: "bottom",
title: msg
})
}
}
3 months ago
}
}
</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;
2 months ago
margin-left: 30rpx;
3 months ago
}
.code{
width: 170rpx;
line-height: 60rpx;
background: #000000;
border-radius: 60rpx;
text-align: center;
font-weight: 500;
font-size: 26rpx;
color: #FFFFFF;
}
}
}
}
</style>