123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222 |
- <template>
- <view class="content">
- <view style="height: 190rpx;"></view>
- <view class="a-title">
- <view class="title">本人实名认证</view>
- <view class="text">用于身份实名核验,反洗钱,资料将严格保密</view>
- </view>
- <view class="a-idcard-box">
- <view class="front" v-if="frontImg!=''" @click="chooseImage(1)">
- <image :src="frontImg" mode=""></image>
- </view>
- <view class="front bg-image" @click="chooseImage(1)" v-else>
- <zzx-icon name="upload" size="30"></zzx-icon>
- <view class="">上传人像面</view>
- </view>
- <view class="flip-side" v-if="flipSideImg!=''" @click="chooseImage(2)">
- <image :src="flipSideImg" mode=""></image>
- </view>
- <view class="flip-side bg-image" v-else @click="chooseImage(2)">
- <zzx-icon name="upload" size="30"></zzx-icon>
- <view class="">上传国徽面</view>
- </view>
- </view>
- <view class="a-form">
- <view class="form-item">
- <view class="">真实姓名</view>
- <input type="text" v-model="formData.fullName" placeholder="请输入本人姓名" />
- </view>
- <view class="form-item">
- <view class="">身份证号</view>
- <input type="idcard" v-model="formData.identityCard" placeholder="请输入本人身份证号" />
- </view>
- <view class="form-item">
- <view class="">手机号码</view>
- <input type="number" v-model="formData.phone" placeholder="请输入手机号" />
- </view>
- <view class="form-tips">老人或无手机号,可填写亲友手机号</view>
- </view>
- <view class="u-select-btn">
- <button hover-class="hover-btn" @click="submit">下一步</button>
- </view>
- </view>
- </template>
- <script lang="ts" setup>
- import { ref, onMounted } from 'vue';
- import { http } from '@/utils/http';
- import { RouterUtils,TipsUtils } from '@/utils/util';
- const formData = ref({
- fullName: '',
- identityCard: '',
- phone: ''
- })
-
- const frontImg = ref('')
- const flipSideImg=ref('')
- const chooseImage = (e) => {
- uni.chooseImage({
- count: 1,
- sizeType: ['original', 'compressed'],
- sourceType: ['album', 'camera'],
- success: function (res) {
- if(e==1){
- frontImg.value=res.tempFilePaths;
- }else{
- flipSideImg.value=res.tempFilePaths;
- }
- }
- });
- }
-
- const submit = () => {
- http.post('/my/familyMembers/addFamilyMembers',{...formData.value},{loading:true}).then((res)=>{
- TipsUtils.tips_toast(res.message)
- formData.value.fullName = ''
- formData.value.identityCard = ''
- formData.value.phone = ''
- })
-
- // uni.navigateTo({
- // url: '/pages/index/identityCertifying/index'
- // })
- // uni.checkIsSupportSoterAuthentication({
- // success: (res) => {
- // wx.startFacialRecognitionVerify({
- // name: '',
- // idCardNumber: '',
- // success: (res) => {
- // if (res.errMsg == 'startFacialRecognitionVerify:ok') {
- // console.log(res,'人脸识别结果:success');
- // }
- // },
- // fail: (err) => {
- // console.log(err,'人脸识别结果:fail')
- // uni.showToast({
- // title: '人脸识别失败',
- // icon: 'none',
- // duration: 20000,
- // });
- // }
- // })
- // },
- // fail: (err) => {
- // console.log(err)
- // }
- // })
- }
- </script>
- <style lang="less" scoped>
- .content {
- background: #fff;
- height: 1300rpx;
- .a-title {
- text-align: center;
- .title {
- font-weight: 800;
- font-size: 36rpx;
- color: #222222;
- }
- .text {
- margin-top: 20rpx;
- font-size: 24rpx;
- color: #AAAAAA;
- }
- }
- .a-idcard-box{
- display: flex;
- align-items: center;
- justify-content: space-around;
- font-size: 28rpx;
- color: #222222;
- margin-top: 40rpx;
- .front{
- width: 332rpx;
- height: 204rpx;
- border-radius: 16rpx;
- background-image: url('@/static/idcard-front.png');
- display: flex;
- align-items: center;
- justify-content: center;
- flex-direction: column;
- &>image{
- width: 100%;
- height: 100%;
- border-radius: 16rpx;
- }
- }
- .flip-side{
- width: 332rpx;
- height: 204rpx;
- border-radius: 16rpx;
- background-image: url('@/static/idcard-flipSide.png');
- display: flex;
- align-items: center;
- justify-content: center;
- flex-direction: column;
- &>image{
- width: 100%;
- height: 100%;
- border-radius: 16rpx;
- }
- }
- }
- .a-form {
- margin-top: 20rpx;
- .form-item {
- height: 110rpx;
- display: flex;
- align-items: center;
- gap: 20rpx;
- border-bottom: 1rpx solid #F0F0F0;
- font-weight: bold;
- font-size: 28rpx;
- color: #222222;
- &>input {
- font-weight: normal;
- }
- }
- .form-tips{
- margin-top: 20rpx;
- font-size: 24rpx;
- color: #AAAAAA;
- }
- }
- .u-select-btn {
- position: fixed;
- width: 100%;
- height: 300rpx;
- left: 0;
- bottom: 0;
- background: #fff;
- &>button {
- width: 95%;
- height: 100rpx;
- line-height: 100rpx;
- background: #D3FD76;
- border-radius: 60rpx;
- font-weight: bold;
- font-size: 32rpx;
- color: #222222;
- }
- &>button::after {
- border: none;
- }
- .hover-btn {
- background: #ccf371;
- color: #999999;
- }
- }
- }
- </style>
|