diff --git a/entry/src/main/ets/model/api.ets b/entry/src/main/ets/model/api.ets index bbb88153..85351645 100644 --- a/entry/src/main/ets/model/api.ets +++ b/entry/src/main/ets/model/api.ets @@ -45,4 +45,13 @@ export interface Spzd{ username?: string; kgxm?:string; ksyh?:string; +} +export interface IdCard{ + name?: string; + sex?: string; + nation?: string; + born?: string; + address?: string; + idCard?:string; + photo?:string; } \ No newline at end of file diff --git a/entry/src/main/ets/pages/UserInfo.ets b/entry/src/main/ets/pages/UserInfo.ets index d1db1203..11206150 100644 --- a/entry/src/main/ets/pages/UserInfo.ets +++ b/entry/src/main/ets/pages/UserInfo.ets @@ -21,7 +21,7 @@ import errorMsgDialog from './compontents/errorMsgDialog'; import imageBtn from './compontents/imageBtn'; import FileUtil from '../common/utils/File'; import DB, { ColumnType } from '../common/database/DbSql'; -import { LabelBlockType, QKParamType, SckType, SystemParamType, User } from '../model'; +import { IdCard, LabelBlockType, QKParamType, SckType, SystemParamType, User } from '../model'; import { BusinessError } from '@ohos.base'; import {Carinfo,ExaminerLoginInfo} from '../model/index' @Entry @@ -361,7 +361,7 @@ struct UserInfo { onReadCard(ret: IDCardSDK.IDCardInfo) { console.info(`zzctest xx Read Card ret =${ret.status}`) - let thisVar = AppStorage.get('indexComponent'); + let thisVar:IdCard = AppStorage.get('indexComponent'); if (ret.status == 0) { // status = 1 为读到身份证信息; status = 1 为身份证离开读卡器 // 收到身份证离开读卡器的事件通知,根据实际业务需要决定是否需要清空之前已读取的身份证信息。