身份證閱讀器/社??ㄗx卡器Uni-app SDK二次開(kāi)發(fā)包
DONSEE系列多功能讀寫(xiě)器Android Uniapp API接口規范V1.0.0
本項目Uniapp采用Vue.js框架,調用了身份證讀卡器的庫文件:DonseeDeviceLib-debug.aar,該庫放到nativeplugins\donsee-card\android,然后會(huì )自動(dòng)加載。SDK會(huì )自動(dòng)檢查是否擁有USB設備權限,如沒(méi)有權限,會(huì )自動(dòng)進(jìn)行申請,如果您的安卓設備是定制設備,遇到找不到設備時(shí),請詢(xún)問(wèn)設備定制方是否開(kāi)放了USB接口的系統層權限。
支持產(chǎn)品型號:EST-100、EST-100R、EST-J13X、EST-100M(HID)等機型。
Uni-app平臺開(kāi)發(fā)包下載地址:
【其他下載】
【新】安卓原生SDK V1.0.45-20240305下載↓
【新】安卓Web網(wǎng)頁(yè)版本V1.0.8 SDK下載↓
<!--
//========================================================================
// Uniapp Android 端,vue.js框架,調用.aar原生態(tài)讀卡庫
// 版權所有 廣東東信智能科技有限公司
// 未經(jīng)授權不允許對程序代碼以任何形式任何目的的再發(fā)布
// 官方網(wǎng)站:http://www.eastcoms.com/
// 前端修改日期:2023.12.07
// =======================================================================
-->
<template>
<view class="content">
<text class="title">{{ title }}</text>
<view>
<image v-bind:src="imageUlr" style="width:204rpx; height: 256rpx;" >
</image>
<view
class="resultInfor"
style="white-space: pre-wrap;"
>{{ result }}</view>
<button type="primary" @click="open">打開(kāi)設備</button>
<button type="primary" @click="beep">蜂鳴器</button>
<button type="primary" @click="readIDCard">讀取身份證</button>
<button type="primary" @click="readSSCard">讀取社???lt;/button>
<button type="primary" @click="getBankCardNo">讀取銀行卡</button>
<button type="primary" @click="readICUid">IC卡卡號</button>
<button type="primary" @click="close">關(guān)閉設備</button>
<!-- <view class="">
{{result1}}
</view> -->
</view>
</view>
</template>
<script>
const DonseeDevice = uni.requireNativePlugin('Card-Module');
export default {
data() {
return {
title: '歡迎使用廣東東信智能科技有限公司SDK',
result: '請先打開(kāi)讀卡設備',
result1:0,
imageUlr: '',
};
},
onLoad() {},
methods: {
open(){
DonseeDevice.Donsee_Open(data => {
if(data.result == 0){
this.result = "打開(kāi)設備成功"
}else if(data.result == -2){
this.result = "打開(kāi)設備失?。何窗l(fā)現讀卡器";
}else if(data.result == -4){
this.result = "打開(kāi)設備失?。何传@取usb權限";
}else {
this.result = "打開(kāi)設備失?。?quot;+data.result;
}
});
},
beep(){
let ret = DonseeDevice.Donsee_Beep();
if(ret == 0){
this.result ="蜂鳴成功";
}else{
this.result ="蜂鳴失敗 "+ret;
}
},
close(){
let ret = DonseeDevice.Donsee_Close();
if(ret == 0){
this.result ="關(guān)閉設備成功";
}else{
this.result ="關(guān)閉設備失敗 "+ret;
}
},
readIDCard(){
let idInfo = DonseeDevice.Donsee_ReadIDCard(1); //1:文字+照片 2:文字+照片+指紋
if(idInfo.code == 0){
this.result = "中文姓名:"+ idInfo.name+"\n"
+"英文姓名:"+ idInfo.enFullName+"\n"//如果是Y,則需要和英文姓名備用reserveName組合才是完整姓名
+"性 別:"+ idInfo.sex+"\n"
+"民 族:"+ idInfo.nation+"\n"
+"出身日期:"+ idInfo.birthDate+"\n"
+"家庭住址:"+ idInfo.address+"\n"
+"身份證號:"+ idInfo.idNO+"\n"
+"簽發(fā)單位:"+ idInfo.organs+"\n"
+"開(kāi)始有效期限:"+ idInfo.issueDate+"\n"
+"結束有效期限:"+ idInfo.expireDate+"\n"
+"證件類(lèi)別:"+ idInfo.certType+"\n" //0 I J Y四種證件類(lèi)型
+"證件版本:"+ idInfo.certVersion+"\n"
+"英文姓名備用:"+ idInfo.reserveName+"\n"
+"既往版本號碼:"+ idInfo.previousVersionNO+"\n"
+"通行證號:"+ idInfo.passNu+"\n"
+"簽發(fā)數次:"+ idInfo.signCount+"\n"
//+"指紋數據:"+ idInfo.figData+"\n"
this.imageUlr = "data:image/png;base64,"+idInfo.headStr; //照片base64數據
}else{
this.result = idInfo.code;
}
},
readSSCard(){
let ssCardInfor = DonseeDevice.Donsee_ReadSSCard();
if(ssCardInfor.code == 0){
this.result = "姓 名:"+ ssCardInfor.name+"\n"
+"性 別:"+ ssCardInfor.sex+"\n"
+"民 族:"+ ssCardInfor.nation+"\n"
+"出身日期:"+ ssCardInfor.birthDate+"\n"
+"城市代碼:"+ ssCardInfor.city+"\n"
+"身份證號:"+ ssCardInfor.idNO+"\n"
+"社??ㄌ枺?quot;+ ssCardInfor.cardNO+"\n"
+"開(kāi)始有效期限:"+ ssCardInfor.issueDate+"\n"
+"結束有效期限:"+ ssCardInfor.expireDate+"\n"
+"社保版本:"+ ssCardInfor.fullVersion+"\n"
}else{
this.result = ssCardInfor.code;
}
},
getBankCardNo(){
let cardInfor = DonseeDevice.Donsee_GetBankCardNo();
if(cardInfor.code == 0){
this.result = "卡號:"+ cardInfor.cardNumber
}else{
this.result = cardInfor.code;
}
},
readICUid(){
let cardInfor = DonseeDevice.Donsee_ReadICUid();
if(cardInfor.code == 0){
this.result = "卡號:"+ cardInfor.cardNumber
}else{
this.result = cardInfor.code;
}
}
}
};
</script>
<style>
.content {
text-align: left;
height: 400upx;
}
.resultInfor {
text-align: left;
}
.title {
font-size: 36upx;
color: #8f8f94;
}
button {
margin-top: 20upx;
margin-bottom: 20upx;
}
.button-sp-area {
margin: 0 auto;
width: 60%;
}
.content {
text-align: center;
height: 400upx;
}
.wrapper {
flex-direction: column;
justify-content: center;
}
.button {
width: 200px;
margin-top: 20px;
margin-left: 20px;
padding-top: 20px;
padding-bottom: 20px;
border-width: 2px;
border-style: solid;
border-color: #458b00;
background-color: #458b00;
}
.text {
font-size: 30px;
color: #666666;
text-align: center;
}
</style>
- 身份證閱讀器/身份證讀卡器Android X86-X64安卓版本SDK
- 藍牙身份證閱讀器系列微信藍牙小程序SDK二次開(kāi)發(fā)包下載
- EST-R5雙屏臺式人證核驗系統SDK二次開(kāi)發(fā)包
- EST-M20手持人臉識別終端二次開(kāi)發(fā)包SDK下載
- EST系列身份證閱讀器(讀卡器)Linux二次開(kāi)發(fā)包SDK(含
- EST-100身份證社??ㄗx卡器Windows SDK接口文檔
- 身份證閱讀器如何在Linux操作系統讀取身份證信息以及相
- DONSEE系列身份證讀卡器閱讀器谷歌火狐瀏覽器Web網(wǎng)頁(yè)開(kāi)
- 身份證閱讀器360瀏覽器極速模式網(wǎng)頁(yè)SDK接口二次開(kāi)發(fā)控件
- 身份證閱讀器Android安卓串口SDK通用二次開(kāi)發(fā)包接口