Browse Source

ocr识别校验

devlop
mo-bai 4 years ago
parent
commit
6b1a374b70
1 changed files with 14 additions and 0 deletions
  1. 14
      pages/complete-info/EnterpriseForm.vue

14
pages/complete-info/EnterpriseForm.vue

@ -342,6 +342,20 @@ export default {
licenseOcr(url) { licenseOcr(url) {
getLicenseOcr({ photoUrl: url }).then((res) => { getLicenseOcr({ photoUrl: url }).then((res) => {
if (res) { if (res) {
if (!res.regNum) {
uni.showToast({
title: '识别社会信用代码失败',
icon: 'none'
})
return
}
if (!res.company) {
uni.showToast({
title: '识别企业名称失败',
icon: 'none'
})
return
}
this.form.uniformSocialCreditCode = res.regNum this.form.uniformSocialCreditCode = res.regNum
this.form.name = res.company this.form.name = res.company
this.form.businessLicenseImg = url this.form.businessLicenseImg = url

Loading…
Cancel
Save