edit
This commit is contained in:
@ -133,7 +133,6 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit {
|
||||
if (res) {
|
||||
this.billEvaluateList = res;
|
||||
console.log(this.billEvaluateList);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -420,10 +419,13 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
changeUpload({ file, fileList, type }: any, data: any, key: string, key2: string) {
|
||||
changeUpload({ file, fileList, type }: any, data: any, key: string, key2: string, id: string) {
|
||||
if (type === 'success') {
|
||||
data[key] = file.response.data?.fullFileWatermarkPath;
|
||||
data[key2] = file.response.data?.fullFilePath;
|
||||
if (id === 'certificateBackFront' || id === 'certificateBack') {
|
||||
this.checkIdCard(file.response.data?.fullFilePath, id === 'certificateBackFront' ? 'front' : 'back', 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -452,4 +454,28 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit {
|
||||
goBack() {
|
||||
window.history.go(-1);
|
||||
}
|
||||
|
||||
// 识别身份证 参数isFront:front-正面、back-背面;type:0-申请人身份证,1-法定代表人身份证
|
||||
checkIdCard(imgurl: any, isFront: string, type: number) {
|
||||
const params = {
|
||||
idCardUrl: imgurl,
|
||||
side: isFront
|
||||
};
|
||||
this.service.request(this.service.$api_ocr_recognize_id_card, params).subscribe(res => {
|
||||
if (res) {
|
||||
// 企业管理员证件照
|
||||
if (type === 0) {
|
||||
if (isFront === 'front') {
|
||||
// 正面
|
||||
if (res.name) {
|
||||
this.userIdentityDetail.name = res.name;
|
||||
}
|
||||
if (res.number) {
|
||||
this.userIdentityDetail.certificateNumber = res.number;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user