|
|
@@ -12,36 +12,77 @@ $().ready(function(){
|
|
|
//身份证
|
|
|
//includeScript("baseISSObject.js", function(){
|
|
|
//includeScript("baseISSOnline.js", function(){
|
|
|
-var setting = {
|
|
|
- Cert: {
|
|
|
- callBack: function (result) {
|
|
|
- setCertificateData(result);
|
|
|
- },
|
|
|
- select: "#button_readID"
|
|
|
- },
|
|
|
- Methods: {
|
|
|
- showMessage: function (type, message) {
|
|
|
- $("#cert_message").text(message);
|
|
|
- $("#cert_message_type").text(msgType[type]);
|
|
|
- },
|
|
|
- downloadDrive: function () {
|
|
|
- $.jBox.closeTip();
|
|
|
- messageBox({
|
|
|
- messageType: "confirm", text: "请安装相关硬件驱动!点击确定下载驱动。",
|
|
|
- callback: function (result) {
|
|
|
- if (result) {
|
|
|
- window.location.href = "middleware/ZKIDROnline.exe";
|
|
|
- }
|
|
|
- closeMessage();
|
|
|
+// var setting = {
|
|
|
+// Cert: {
|
|
|
+// callBack: function (result) {
|
|
|
+// setCertificateData(result);
|
|
|
+// },
|
|
|
+// select: "#button_readID"
|
|
|
+// },
|
|
|
+// Methods: {
|
|
|
+// showMessage: function (type, message) {
|
|
|
+// $("#cert_message").text(message);
|
|
|
+// $("#cert_message_type").text(msgType[type]);
|
|
|
+// },
|
|
|
+// downloadDrive: function () {
|
|
|
+// $.jBox.closeTip();
|
|
|
+// messageBox({
|
|
|
+// messageType: "confirm", text: "请安装相关硬件驱动!点击确定下载驱动。",
|
|
|
+// callback: function (result) {
|
|
|
+// if (result) {
|
|
|
+// window.location.href = "middleware/ZKIDROnline.exe";
|
|
|
+// }
|
|
|
+// closeMessage();
|
|
|
+// }
|
|
|
+// });
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+// try {
|
|
|
+// createISSonlineDevice(setting);
|
|
|
+// } catch (e) {
|
|
|
+// console.info("不要用读取身份证");
|
|
|
+// }
|
|
|
+/**
|
|
|
+ * 身份证读卡
|
|
|
+ * @param params
|
|
|
+ */
|
|
|
+function siReadIdCard(params) {
|
|
|
+ $.ajax({
|
|
|
+ type: "GET",
|
|
|
+ url: 'http://localhost:8321/readcard/entry?param='+params,
|
|
|
+ contentType: "application/json;charset=UTF-8",
|
|
|
+ dataType: "json",
|
|
|
+ headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
|
|
|
+ success: function (res) {
|
|
|
+ if (res == '401' || res == 401) {
|
|
|
+ window.location.href = '/thmz/login/view'
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (res.code == 200) {
|
|
|
+ var str = res.data.split("^")
|
|
|
+ var str1= str.filter(item=>item !='')
|
|
|
+ var Certificate = {
|
|
|
+ Birthday:str1[4],
|
|
|
+ IDNumber:str1[0],
|
|
|
+ Name:str1[1],
|
|
|
+ Address:str1[5],
|
|
|
+ Base64Photo:str1[8],
|
|
|
+ Nation:str1[3],
|
|
|
+ IDIssued:str1[6],
|
|
|
+ IssuedData:str1[7].substring(0,8),
|
|
|
+ ValidDate:str1[7].substring(8),
|
|
|
+ Sex:str1[2]
|
|
|
}
|
|
|
- });
|
|
|
+ var resultData = {Certificate:Certificate}
|
|
|
+ console.log('resultData',resultData);
|
|
|
+ setCertificateData(resultData)
|
|
|
+ } else {
|
|
|
+ errorMesage(res);
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
-}
|
|
|
-try {
|
|
|
- createISSonlineDevice(setting);
|
|
|
-} catch (e) {
|
|
|
- console.info("不要用读取身份证");
|
|
|
+ });
|
|
|
+ // window.open('ReadCard://'+prm, '_self')
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -76,8 +117,11 @@ function setCertificateData(result) {
|
|
|
$("#imageIdCard").val(result.Certificate.Base64Photo);
|
|
|
setNation(result.Certificate.Nation);
|
|
|
$("#nationToUpload").val(result.Certificate.Nation);
|
|
|
+ //机关单位
|
|
|
$("#idIssued").val(result.Certificate.IDIssued);
|
|
|
+ //有效期 开始时间
|
|
|
$("#issuedData").val(result.Certificate.IssuedData);
|
|
|
+ //有效期结束时间
|
|
|
$("#validDate").val(result.Certificate.ValidDate);
|
|
|
|
|
|
} catch (e) {
|