| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- <template>
- <div class="real-info">
- <h1>实名信息验证</h1>
- <div class="line"></div>
- <el-form ref="ruleForm" class="contents" :model="ruleForm" :rules="rules">
- <el-form-item prop="mobile">
- <div class="mobile">旧手机号</div>
- <el-input placeholder="请输入手机号" v-model="ruleForm.mobile"></el-input>
- </el-form-item>
- <el-form-item prop="idCardNo">
- <div class="code">身份证号</div>
- <el-input placeholder="请输入身份证号" v-model="ruleForm.idCardNo"></el-input>
- </el-form-item>
- </el-form>
- <div class="sub-container">
- <el-button class="next-btn" type="primary" @click="clickNext">下一步</el-button>
- </div>
- </div>
- </template>
- <script>
- import VerCode from '@/components/ver_code'
- export default {
- components: {
- VerCode,
- },
- data() {
- return {
- ruleForm: {
- mobile: '',
- idCardNo: '',
- },
- rules: {
- mobile: [
- { required: true, message: '手机号错误', trigger: 'blur' }
- ],
- idCardNo: [
- { required: true, message: '身份证号不能为空', trigger: 'blur' }
- ],
- }
- }
- },
- methods: {
- clickNext() {
- this.$refs['ruleForm'].validate(async (valid) => {
- if(valid) {
- let res = await this.$axios.$post('/api/user/checkUserIdentify', {
- mobile: this.ruleForm.mobile,
- id_card_no: this.ruleForm.idCardNo,
- })
- if(res) {
- this.$message({
- message: res.info,
- type: 'success'
- })
- setTimeout(() => {
- this.$router.push('/setting/check/change_mobile')
- }, 1000)
- }
- } else {
- console.log('error submit!!')
- return false
- }
- });
- }
- }
- }
- </script>
- <style scoped>
- .real-info {
- display: flex;
- flex-direction: column;
- align-items: center;
- width: 1000px;
- height: 588px;
- background: white;
- margin-top: 20px;
- }
- h1 {
- margin: 27px 0 25px;
- }
- .line {
- width: 960px;
- height: 2px;
- background: rgba(0, 0, 0, 0.06);
- }
- .el-input {
- width: 311px;
- height: 44px;
- }
- .mobile {
- margin: 102px 0 5px;
- }
- .code {
- margin: 0 0 5px;
- }
- .sub-container {
- width: 311px;
- }
- .next-btn {
- width: 125px;
- margin: 20px 0 41px;
- }
- .el-form-item {
- margin: 0;
- }
- </style>
|