更新记录
1.0.1(2024-07-22)
支持64位
1.0.0(2024-07-20)
华视电子,身份证阅读器
平台兼容性
uni-app(3.7.1)
| Vue2 |
Vue3 |
Chrome |
Safari |
app-vue |
app-nvue |
Android |
iOS |
鸿蒙 |
| - |
- |
- |
- |
√ |
√ |
5.0 |
- |
- |
| 微信小程序 |
支付宝小程序 |
抖音小程序 |
百度小程序 |
快手小程序 |
京东小程序 |
鸿蒙元服务 |
QQ小程序 |
飞书小程序 |
小红书小程序 |
快应用-华为 |
快应用-联盟 |
| - |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
uni-app x(3.7.1)
| Chrome |
Safari |
Android |
iOS |
鸿蒙 |
微信小程序 |
| - |
- |
5.0 |
- |
- |
- |
其他
华视电子,身份证阅读器
集成插件
- 拷贝demo示例的AndroidManifest.xml到项目根目录
- manifest.json -》 app常用其他设置 -》 支持CPU类型,只选择armeabi-v7a
- 咨询或定制请点击上面"进入交流群"按钮私聊作者
业务定制需求可***252797991
接口
import {
UTSHuashiIdcardNfc
} from "@/uni_modules/wrs-huashi-idcardnfc"
let idcard = new UTSHuashiIdcardNfc()
let ret = idcard.getSAMStatus()
if (ret == 0x90) {
this.showMsg("模块状态良好")
} else {
this.showMsg("模块状态错误:" + ret)
}
let filePath = plus.io.convertLocalFileSystemURL("_download/aa.png");
let params = {}
params.filePath = filePath // // 图片保存路径
let result = idcard.PICC_Reader_ForeignerIDCard(params)
let ret = result.ret
if (ret == 0 || ret == 1) {
// ret: 0 中国身份证 1 外国人永久居住证
this.showMsg("读取成功:" + JSON.stringify(result))
} else {
this.showMsg("读取失败:" + JSON.stringify(result))
}
let filePath = plus.io.convertLocalFileSystemURL("_download/bb.png");
let params = {}
params.filePath = filePath // 图片保存路径
let result = idcard.readBaseMsgToStr(params)
if (ret == 0x90) {
this.showMsg("读取成功:" + JSON.stringify(result))
} else {
this.showMsg("读取失败:" + JSON.stringify(result))
}
idcard.closeDevice()