<bdo id="uh4vp"></bdo><track id="uh4vp"><div id="uh4vp"></div></track>
<track id="uh4vp"></track>
<bdo id="uh4vp"></bdo>

<track id="uh4vp"></track>
    1. <track id="uh4vp"></track>

      DONSEE東信智能 - 中國領先的身份證社??ㄖ悄芙K端應用服務商

      eastcoms@qq.com
      400-6722-705
      首頁 > 服務支持專區 > 產品支持 > SDK開發包和軟件下載

      東信藍牙身份證閱讀器系列微信藍牙小程序SDK二次開發包下載

      來源:www.eastcoms.com   標簽:藍牙 微信 小程序 閱讀器 讀卡器 SDK 開發包   發布時間: 2020-11-30 14:42:03

      東信EST-100GB藍牙身份證閱讀器

      東信藍牙身份證閱讀器藍牙手持便攜式身份證讀卡器EST-100GB開發包,支持微信小程序無縫對接,支持蘋果手機IOS、華為、榮耀、Oppo、Vivo、小米等多種品牌手機使用。

      東信身份證閱讀器系列微信藍牙小程序SDK二次開發包下載

      版本:V2019.07.05

      東信EST-100GB藍牙身份證閱讀器機具率先支持微信小程序中讀取身份證信息,以及同時支持通過USB連電腦使用、USB連安卓終端使用,藍牙連接安卓終端使用,一款設備,多種用途,更加方便快捷。

      以下為微信小程序中部分代碼:

      const formatTime = date => {

        const year = date.getFullYear()

        const month = date.getMonth() + 1

        const day = date.getDate()

        const hour = date.getHours()

        const minute = date.getMinutes()

        const second = date.getSeconds()

        return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':')

      }

      const formatNumber = n => {

        n = n.toString()

        return n[1] ? n : '0' + n

      }

      //將Uint8Array轉換為str

      function uint8ArrayToStr(uint8Arrys) {

        //數組與中文之間的轉換---start

        // var testStr = str2arrayBuffer('中文轉換測試dvadsgaag550!#')

        // var strUint8Array = new Uint8Array(testStr)

        var strArrayBuffer = arrayToBuffer(uint8Arrys)//將Uint8Array轉換為ArrayBuffer

        var strUint16Array = new Uint16Array(strArrayBuffer)//將ArrayBuffer轉換為Uint16Array

        var testStrNew = array2Str(strUint16Array)//將Uint16Array轉換為漢字

        return testStrNew.replace(/(^\s+)|(\s+$)/g, "");

      }

      function array2Str(buf) {

        return String.fromCharCode.apply(null, new Uint16Array(buf));

      }

      // function str2arrayBuffer(str) {

      //   var buf = new ArrayBuffer(str.length * 2); // 2 bytes for each char

      //   var bufView = new Uint16Array(buf);

      //   for (var i = 0, strLen = str.length; i < strLen; i++) {

      //     bufView[i] = str.charCodeAt(i);

      //   }

      //   return buf;

      // }

      function arrayToBuffer(array) {

        var buffer = new ArrayBuffer(array.length)

        var dataView8 = new Uint8Array(buffer)

        for (var i = 0; i < array.length; i++) {

          dataView8[i] = array[i]

        }

        return buffer

      }

      function stringToArrayBuffer(hexString){

        var typedArray3 = new Uint8Array(hexString.match(/[\da-f]{2}/gi).map(function (h) {

          return parseInt(h, 16)

        }))

        var buffer3 = typedArray3.buffer

        return buffer3

      }

      //數組與中文之間的轉換---stop

      //性別轉換

      function getSexFromCode(strSexCode)

      {

        if ('0' == strSexCode.charAt(0)) {

          return "未知";

        }

        else if ('1' == strSexCode.charAt(0)) {

          return "男";

        }

        else if ('2' == strSexCode.charAt(0)) {

          return "女";

        }

        else if ('9' == strSexCode.charAt(0)) {

          return "未說明";

        }

        return "未定義";

      }

      //民族轉換

      function getNationFromCode(strNationCode)

      {

        if (strNationCode == ("01")) {

          return "漢";

        }

        else if (strNationCode == ("02")) {

          return "蒙古";

        }

        else if (strNationCode == ("03")) {

          return "回";

        }

        else if (strNationCode == ("04")) {

          return "藏";

        }

        else if (strNationCode == ("05")) {

          return "維吾爾";

        }

        else if (strNationCode == ("06")) {

          return "苗";

        }

        else if (strNationCode == ("07")) {

          return "彝";

        }

        else if (strNationCode == ("08")) {

          return "壯";

        }

        else if (strNationCode == ("09")) {

          return "布依";

        }

        else if (strNationCode == ("10")) {

          return "朝鮮";

        }

        else if (strNationCode == ("11")) {

          return "滿";

        }

        else if (strNationCode == ("12")) {

          return "侗";

        }

        else if (strNationCode == ("13")) {

          return "瑤";

        }

        else if (strNationCode == ("14")) {

          return "白";

        }

        else if (strNationCode == ("15")) {

          return "土家";

        }

        else if (strNationCode == ("16")) {

          return "哈尼";

        }

        else if (strNationCode == ("17")) {

          return "哈薩克";

        }

        else if (strNationCode == ("18")) {

          return "傣";

        }

        else if (strNationCode == ("19")) {

          return "黎";

        }

        else if (strNationCode == ("20")) {

          return "傈僳";

        }

        else if (strNationCode == ("21")) {

          return "佤";

        }

        else if (strNationCode == ("22")) {

          return "畬";

        }

        else if (strNationCode == ("23")) {

          return "高山";

        }

        else if (strNationCode == ("24")) {

          return "拉祜";

        }

        else if (strNationCode == ("25")) {

          return "水";

        }

        else if (strNationCode == ("26")) {

          return "東鄉";

        }

        else if (strNationCode == ("27")) {

          return "納西";

        }

        else if (strNationCode == ("28")) {

          return "景頗";

        }

        else if (strNationCode == ("29")) {

          return "柯爾克孜";

        }

        else if (strNationCode == ("30")) {

          return "土";

        }

        else if (strNationCode == ("31")) {

          return "達斡爾";

        }

        else if (strNationCode == ("32")) {

          return "仫佬";

        }

        else if (strNationCode == ("33")) {

          return "羌";

        }

        else if (strNationCode == ("34")) {

          return "布朗";

        }

        else if (strNationCode == ("35")) {

          return "撒拉";

        }

        else if (strNationCode == ("36")) {

          return "毛南";

        }

        else if (strNationCode == ("37")) {

          return "仡佬";

        }

        else if (strNationCode == ("38")) {

          return "錫伯";

        }

        else if (strNationCode == ("39")) {

          return "阿昌";

        }

        else if (strNationCode == ("40")) {

          return "普米";

        }

        else if (strNationCode == ("41")) {

          return "塔吉克";

        }

        else if (strNationCode == ("42")) {

          return "怒";

        }

        else if (strNationCode == ("43")) {

          return "烏孜別克";

        }

        else if (strNationCode == ("44")) {

          return "俄羅斯";

        }

        else if (strNationCode == ("45")) {

          return "鄂溫克";

        }

        else if (strNationCode == ("46")) {

          return "德昂";

        }

        else if (strNationCode == ("47")) {

          return "保安";

        }

        else if (strNationCode == ("48")) {

          return "裕固";

        }

        else if (strNationCode == ("49")) {

          return "京";

        }

        else if (strNationCode == ("50")) {

          return "塔塔爾";

        }

        else if (strNationCode == ("51")) {

          return "獨龍";

        }

        else if (strNationCode == ("52")) {

          return "鄂倫春";

        }

        else if (strNationCode == ("53")) {

          return "赫哲";

        }

        else if (strNationCode == ("54")) {

          return "門巴";

        }

        else if (strNationCode == ("55")) {

          return "珞巴";

        }

        else if (strNationCode == ("56")) {

          return "基諾";

        }

        else if (strNationCode == ("97")) {

          return "其他";

        }

        else if (strNationCode == ("98")) {

          return "外國血統中國籍人士";

        }

        return "未知";

      }

      module.exports = {

        formatTime: formatTime,

        uint8ArrayToStr: uint8ArrayToStr,

        stringToArrayBuffer: stringToArrayBuffer,

        getSexFromCode: getSexFromCode,

        getNationFromCode: getNationFromCode

      }


       

       
      QQ在線咨詢

      <bdo id="uh4vp"></bdo><track id="uh4vp"><div id="uh4vp"></div></track>
      <track id="uh4vp"></track>
      <bdo id="uh4vp"></bdo>

      <track id="uh4vp"></track>
      1. <track id="uh4vp"></track>
        黑人太凶猛一夜没出来_这里只有精品在线视频_亚洲欧美日韩制服二区dvd,欧美日韩亚洲国内综合网,秋霞手机在线观看秋理论