style:证书领取
Showing
1 changed file
with
30 additions
and
2 deletions
1 | <!-- | 1 | <!-- |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-11-07 08:46:12 | 4 | * @LastEditTime: 2023-12-18 09:24:03 |
5 | --> | 5 | --> |
6 | <template> | 6 | <template> |
7 | <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px"> | 7 | <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px"> |
... | @@ -146,7 +146,34 @@ | ... | @@ -146,7 +146,34 @@ |
146 | * @author: renchao | 146 | * @author: renchao |
147 | */ | 147 | */ |
148 | readClick () { | 148 | readClick () { |
149 | getIdCardInfo().then(res => { | 149 | function getObjectByValue (arrayOfObjects, value) { |
150 | var name = '' | ||
151 | arrayOfObjects.forEach(item => { | ||
152 | if (item.dname.includes(value)) name = item.dcode | ||
153 | }) | ||
154 | return name | ||
155 | } | ||
156 | getIdCardInfo(this.BASE_API.gaopaiyi).then(res => { | ||
157 | if (this.BASE_API.gaopaiyi == 'jy') { | ||
158 | const { | ||
159 | Name, | ||
160 | IdNo, | ||
161 | } = JSON.parse(res) | ||
162 | if (Name) { | ||
163 | this.ruleForm.lzrxm = Name; | ||
164 | this.ruleForm.lzrzjlb = '1'; | ||
165 | this.ruleForm.lzrzjh = IdNo; | ||
166 | this.$message({ | ||
167 | message: '读取成功!', | ||
168 | type: 'success' | ||
169 | }) | ||
170 | } else { | ||
171 | this.$message({ | ||
172 | message: '请放置身份证', | ||
173 | type: 'warning' | ||
174 | }) | ||
175 | } | ||
176 | } else { | ||
150 | if (res.data.code == 0) { | 177 | if (res.data.code == 0) { |
151 | let data = res.data.IDCardInfo | 178 | let data = res.data.IDCardInfo |
152 | this.ruleForm.lzrxm = data.name | 179 | this.ruleForm.lzrxm = data.name |
... | @@ -162,6 +189,7 @@ | ... | @@ -162,6 +189,7 @@ |
162 | type: 'warning' | 189 | type: 'warning' |
163 | }) | 190 | }) |
164 | } | 191 | } |
192 | } | ||
165 | }) | 193 | }) |
166 | }, | 194 | }, |
167 | /** | 195 | /** | ... | ... |
-
Please register or sign in to post a comment