136 lines
3.6 KiB
Vue
136 lines
3.6 KiB
Vue
<template>
|
|
<tpx-page>
|
|
<tpx-layout>
|
|
<template v-slot:body>
|
|
<view class="com-jianju pos-rlt pb-30" style="padding-top: 2rpx;">
|
|
|
|
<view class="blcok-white radius-20" style="padding-top: 40rpx;">
|
|
<view>
|
|
<tpx-input v-model:value="submitParam.realName" placeholder="真实姓名"></tpx-input>
|
|
</view>
|
|
<view class="mt-20">
|
|
<tpx-select placeholder="证件类型" v-model:value="submitParam.idType" :list="dicData.emis_id_type"
|
|
mode="drop"
|
|
></tpx-select>
|
|
</view>
|
|
<view class="mt-20">
|
|
<tpx-input v-model:value="submitParam.idNo" placeholder="证件号"></tpx-input>
|
|
</view>
|
|
|
|
<view class="mb-10 mt-20">
|
|
<u-row justify="between">
|
|
<u-col span="5">
|
|
<tpx-upload v-model:value="submitParam.idPic1" :isSlot="true">
|
|
<view class="up-item">
|
|
<u-image :src="getCdnUrl(`mine/shen-zh.svg`)" height="150" width="200"></u-image>
|
|
<u-text :text="'身份证人像面'" size="28" align="center"></u-text>
|
|
</view>
|
|
</tpx-upload>
|
|
</u-col>
|
|
<u-col span="5">
|
|
<tpx-upload v-model:value="submitParam.idPic2" :isSlot="true">
|
|
<view class="up-item">
|
|
<u-image :src="getCdnUrl(`mine/shen-fan.svg`)" height="150" width="200"></u-image>
|
|
<u-text :text="'身份证国徽面'" size="28" align="center"></u-text>
|
|
</view>
|
|
</tpx-upload>
|
|
</u-col>
|
|
</u-row>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<template v-slot:footer>
|
|
<view class="blcok-white-noradius">
|
|
<u-button @click="handleSubmit()" :disabled="submitParam.idVerifyStatus == 1" type="primary" size="large" shape="circle"
|
|
custom-style="height:80rpx;font-size: 30rpx;">{{submitParam.idVerifyStatus == 1 ?'已实名':'提交实名'}}</u-button>
|
|
</view>
|
|
</template>
|
|
</tpx-layout>
|
|
</tpx-page>
|
|
</template>
|
|
|
|
<script>
|
|
import * as apiService from "@/common/api"
|
|
import { checkParams } from "@/common/validate"
|
|
|
|
export default {
|
|
props: {
|
|
// hasLeftWin: {
|
|
// type: Boolean
|
|
// }
|
|
},
|
|
computed: {
|
|
dicData() {
|
|
return this.$store.getters.dicData
|
|
},
|
|
},
|
|
data() {
|
|
|
|
return {
|
|
// 基础表单数据
|
|
submitParam: {
|
|
idType: this.$store.getters.dicData?.emis_id_type?.[0]?.value,
|
|
// "idVerifyStatus": "1-已实名 0-未实名"
|
|
},
|
|
submitValidConfig: {
|
|
realName: { required: true, requiredMsg: '姓名不能为空' },
|
|
idType: { required: true, requiredMsg: '证件类型不能为空' },
|
|
idNo: { required: true, requiredMsg: '证件号不能为空' },
|
|
// idPic1: { required: true, requiredMsg: '身份证人像面不能为空' },
|
|
// idPic2: { required: true, requiredMsg: '身份证国徽面不能为空' },
|
|
},
|
|
}
|
|
},
|
|
onShareAppMessage() {
|
|
return {
|
|
// title: '',
|
|
// path: 'TODO'
|
|
}
|
|
},
|
|
onLoad() {
|
|
this.initData();
|
|
},
|
|
onUnload() {
|
|
|
|
},
|
|
methods: {
|
|
initData() {
|
|
this.getCertDetail()
|
|
},
|
|
async getCertDetail(){
|
|
let res = await apiService.getIdVerification()
|
|
res.data && (this.submitParam = res.data)
|
|
},
|
|
handleFormChange() {
|
|
|
|
},
|
|
async handleSubmit() {
|
|
let params = { ...this.submitParam }
|
|
await checkParams(params, this.submitValidConfig)
|
|
let res = await apiService.idVerification(params)
|
|
this.showToast('提交成功,请等待审核')
|
|
this.getCertDetail()
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
@import '@/common/uni-nvue.scss';
|
|
|
|
page {
|
|
background-color: #F6F6F6;
|
|
height: 100% !important;
|
|
}
|
|
</style>
|
|
<style scoped lang="scss">
|
|
.up-item{
|
|
width: 200rpx;
|
|
padding-bottom: 16rpx;
|
|
border: 2rpx solid #EFEFEF;
|
|
border-radius: 6rpx;
|
|
background: #F8F8F8;
|
|
}
|
|
</style> |