From 2fdc3dc444a2f8199866780205c0fa4b5ac40522 Mon Sep 17 00:00:00 2001 From: liuwh <hugeinfo123> Date: Fri, 29 May 2020 10:38:46 +0800 Subject: [PATCH] 指纹登记与对比 --- SunshineIns/src/copy/fingerprint/js/main.js | 12 SunshineIns/src/fetch/criminalDelete.js | 9 SunshineIns/src/fetch/index.js | 10 SunshineIns/src/page/UnderAgeList.jsx | 4 SunshineIns/src/fetch/_fetch.js | 1 SunshineIns/src/asset/image/bg_ns.jpg | 0 SunshineIns/src/conf/reset.scss | 8 SunshineIns/src/fetch/criminalCompare.js | 9 SunshineIns/src/index.jsx | 8 SunshineIns/src/fetch/criminalQuery.js | 9 SunshineIns/src/data/menu.js | 15 /dev/null | 72 -- SunshineIns/src/copy/fingerprint/bidui.html | 25 SunshineIns/src/copy/fingerprint/js/fingerprint.js | 1117 ++++++++++++++++----------------------- SunshineIns/src/fetch/criminalFind.js | 6 SunshineIns/src/page/CriminalExecution.jsx | 145 ++-- SunshineIns/src/page/CriminalExecutionManager.jsx | 93 +++ SunshineIns/src/copy/fingerprint/dengji.html | 2 SunshineIns/src/page/CareList.jsx | 24 SunshineIns/src/page/CareListEdit.jsx | 95 -- SunshineLnsMinApp/pages/index/index.js | 2 SunshineIns/src/fetch/criminalSave.js | 7 SunshineLnsMinApp/pages/index/index.wxml | 2 23 files changed, 761 insertions(+), 914 deletions(-) diff --git a/SunshineIns/src/asset/image/bg_ns.jpg b/SunshineIns/src/asset/image/bg_ns.jpg new file mode 100644 index 0000000..cf689c8 --- /dev/null +++ b/SunshineIns/src/asset/image/bg_ns.jpg Binary files differ diff --git a/SunshineIns/src/conf/reset.scss b/SunshineIns/src/conf/reset.scss index 69b1750..47301ae 100644 --- a/SunshineIns/src/conf/reset.scss +++ b/SunshineIns/src/conf/reset.scss @@ -23,6 +23,14 @@ margin: 0; } +/* 禁止换行 */ +.nowrap { + max-width: 250px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + #root { height: 100%; overflow-x: hidden; diff --git "a/SunshineIns/src/copy/fingerprint/\346\214\207\347\272\271\347\231\273\350\256\260.html" b/SunshineIns/src/copy/fingerprint/bidui.html similarity index 81% copy from "SunshineIns/src/copy/fingerprint/\346\214\207\347\272\271\347\231\273\350\256\260.html" copy to SunshineIns/src/copy/fingerprint/bidui.html index 3e4a4d8..eb12ca8 100644 --- "a/SunshineIns/src/copy/fingerprint/\346\214\207\347\272\271\347\231\273\350\256\260.html" +++ b/SunshineIns/src/copy/fingerprint/bidui.html @@ -2,7 +2,7 @@ <html> <head> - <title>指纹登记</title> + <title>指纹比对</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link rel="stylesheet" href="css/box.css" type="text/css"> <script type="text/javascript" src="js/main.js"></script> @@ -12,28 +12,32 @@ <script type="text/javascript" src="js/dhtmlxCommon.js"></script> </head> -<body> +<body onload="myfunction()"> <form method="post" id="fpVerifyForm" name="fpVerifyForm" action="authLoginAction!login.do?fpLogin=fpLogin" enctype="multipart/form-data" style="display: none"> <input type="hidden" id="verifyModel" name="verifyModel" /> <input type="hidden" id="verifyTemplate" name="verifyTemplate" /> + </form> - <div id="fpRegisterDiv" style="display: inline; height: do"> + <div id="fpRegisterDiv" style="display: none; height: do"> <a id="fpRegister" onclick='submitRegister("指纹", "指纹数:", "确认保存当前修改吗?", "驱动下载", false)' title="请安装指纹驱动或启动该服务" class="showGray" onmouseover="this.className='showGray'">注册</a> </div> <div id="driverDownload" style="display: inline; margin: 0 0 0 5px;"> <a id='downloadDriver' href='middleware/zkbioonline.exe' title='驱动下载'>驱动下载</a> </div> - <div id="comparison" style="display: none" onclick='fpVerification("指纹比对","请安装指纹驱动或启动服务",true,globalContext)'>比对 - </div> + <button id="comparison" style="display: inline" + onclick='fpVerification("指纹比对","请安装指纹驱动或启动服务",true,globalContext)'>比对 + </button> <div id="comparisonDiv" class="box" style="display: none"> <h2>指纹比对</h2> <div class="list"> <canvas id="canvasComp" width="430" height="320" style="background: url('image/base_fpVerify.jpg') rgb(243, 245, 240);"></canvas> <input type="button" value="关闭" onclick='closeCompa()' /> + <input type="button" value="确认" onclick='submitLick()' /> + </div> </div> @@ -45,7 +49,7 @@ <input type="hidden" id="whetherModify" name="whetherModify" alt="" value="111" /> <div style="position: absolute; left: 310px; top: 325px; width: 70px; height: 28px;"> - <button type="button" id="submitButtonId" name="makeSureName" onclick="submitEvent(event)" + <button type="button" id="submitButtonId" name="makeSureName" onclick="submitEvent()" class="button-form">确定</button> <!-- ${common_edit_ok}:确定 --> </div> @@ -69,6 +73,15 @@ false ); } + + function submitLick() { + window.top.postMessage({ + submitstatus: true, + }); + $("#bg").css("display", "none"); + $("#box").css("display", "none"); + $("#comparisonDiv").css("display", "none"); + } </script> </html> \ No newline at end of file diff --git "a/SunshineIns/src/copy/fingerprint/\346\214\207\347\272\271\347\231\273\350\256\260.html" b/SunshineIns/src/copy/fingerprint/dengji.html similarity index 96% rename from "SunshineIns/src/copy/fingerprint/\346\214\207\347\272\271\347\231\273\350\256\260.html" rename to SunshineIns/src/copy/fingerprint/dengji.html index 3e4a4d8..9d4f5c9 100644 --- "a/SunshineIns/src/copy/fingerprint/\346\214\207\347\272\271\347\231\273\350\256\260.html" +++ b/SunshineIns/src/copy/fingerprint/dengji.html @@ -42,7 +42,7 @@ <h2>指纹登记</h2> <div class="list"> <canvas id="canvas" width="430" height="450" style="background: rgb(243, 245, 240)"></canvas> - <input type="hidden" id="whetherModify" name="whetherModify" alt="" value="111" /> + <button type="hidden" id="whetherModify" name="whetherModify" alt="" value="111" /> <div style="position: absolute; left: 310px; top: 325px; width: 70px; height: 28px;"> <button type="button" id="submitButtonId" name="makeSureName" onclick="submitEvent(event)" diff --git a/SunshineIns/src/copy/fingerprint/js/fingerprint.js b/SunshineIns/src/copy/fingerprint/js/fingerprint.js index 138ada4..0ff39a7 100644 --- a/SunshineIns/src/copy/fingerprint/js/fingerprint.js +++ b/SunshineIns/src/copy/fingerprint/js/fingerprint.js @@ -31,9 +31,9 @@ //是否是访客 var isVisPager = false; //定义驱动的版本号 -var fpDriverVersion="5.0.0.1"; +var fpDriverVersion = "5.0.0.1"; //是否为比对功能 -var isComp= false; +var isComp = false; /** * 加载xml中ISSOnline_server的ip和port @@ -41,30 +41,27 @@ * @create 2013-06-15 15:01:31 pm * @param url 加载xml的url */ -function loadXml(url) -{ - $.ajax( { - type : "GET", - url : url, - dataType : "xml", +function loadXml(url) { + $.ajax({ + type: "GET", + url: url, + dataType: "xml", async: false, - success : function(xml) - { - $(xml).find('service').each(function(){ + success: function (xml) { + $(xml).find('service').each(function () { var service = $(this); - serverIp = service.find('ISSOnline_serverIp').text(); + serverIp = service.find('ISSOnline_serverIp').text(); serverPort = service.find('ISSOnline_serverPort').text(); }) }, - error : function(XMLHttpRequest, textStatus, errorThrown) - { + error: function (XMLHttpRequest, textStatus, errorThrown) { //如果取配置文件出错,则设置默认 serverIp = "127.0.0.1"; serverPort = "22001"; - } + } }); //给issOnlineUrl赋值 - issOnlineUrl = "http://"+serverIp+":"+serverPort+"/ZKBIOOnline"; + issOnlineUrl = "http://" + serverIp + ":" + serverPort + "/ZKBIOOnline"; } /** @@ -74,22 +71,17 @@ * @param fingerIdList 数据库查询的指纹标记 * @param templateList 数据库查询的指纹模板 */ -function loadFPDataTemplate(fingerIdList, templateList) -{ - if(fingerIdList == "[]") - { +function loadFPDataTemplate(fingerIdList, templateList) { + if (fingerIdList == "[]") { $("#fingerId").val(" "); - } - else - { + } + else { $("#fingerId").val(fingerIdList); } - if(templateList == "[]") - { + if (templateList == "[]") { $("#fingerTemplate10").val(" "); - } - else - { + } + else { $("#fingerTemplate10").val(templateList); } } @@ -100,24 +92,20 @@ * @author wenxin * @create 2013-08-09 17:24:31 pm */ -function getBrowserType() -{ +function getBrowserType() { var browserFlag = ""; - //是否支持html5的cors跨域 - if (typeof(Worker) !== "undefined") - { - browserFlag = "html5"; - } - //此处判断ie8、ie9 - else if(navigator.userAgent.indexOf("MSIE 8.0")>0 || navigator.userAgent.indexOf("MSIE 9.0")>0) - { - browserFlag = "simple"; - } - else - { + //是否支持html5的cors跨域 + if (typeof (Worker) !== "undefined") { + browserFlag = "html5"; + } + //此处判断ie8、ie9 + else if (navigator.userAgent.indexOf("MSIE 8.0") > 0 || navigator.userAgent.indexOf("MSIE 9.0") > 0) { + browserFlag = "simple"; + } + else { browserFlag = "upgradeBrowser";//当前浏览器不支持该功能,请升级浏览器 } - return browserFlag; + return browserFlag; } /** @@ -128,28 +116,22 @@ * @param paramArray 存放国际化元素的数组 * @param isFPLogin 是否是指纹登录 true:是;false:否 */ -function checkDriver(paramArray, browserFlag, isFPLogin) -{ +function checkDriver(paramArray, browserFlag, isFPLogin) { var hrefStr = ""; - if(browserFlag == "html5") - { + if (browserFlag == "html5") { // 发送一个请求,检查是否安装驱动 getWebServerInfo(paramArray, isFPLogin, "0"); } - else if(browserFlag == "simple") - { + else if (browserFlag == "simple") { //发送一个请求,检查是否安装驱动 getWebServerInfoForSimple(paramArray, isFPLogin, "0"); } - else if(browserFlag == "upgradeBrowser") - { - if($("#userLoginForm [name='fingerLogin']").val() != undefined) - { + else if (browserFlag == "upgradeBrowser") { + if ($("#userLoginForm [name='fingerLogin']").val() != undefined) { $("#userLoginForm [name='fingerLogin']").attr("onclick", ""); $("#userLoginForm [name='fingerLogin']").attr("title", "当前浏览器不支持改功能,请升级浏览器!"); } - if($("#fpRegister").val() != undefined) - { + if ($("#fpRegister").val() != undefined) { $("#fpRegister").attr("onclick", ""); $("#fpRegister").attr("title", "当前浏览器不支持改功能,请升级浏览器!"); } @@ -165,32 +147,27 @@ * @param type 0 表示发送完请求后,还有别的操作。1 表示发送完请求后,没有其余的操作了 * @create 2013-08-09 17:24:31 pm */ -function getWebServerInfo(paramArray, isFPLogin, type) -{ - $.ajax( { - type : "GET", - url : issOnlineUrl+"/info", - dataType : "json", +function getWebServerInfo(paramArray, isFPLogin, type) { + $.ajax({ + type: "GET", + url: issOnlineUrl + "/info", + dataType: "json", async: true, //timeout:1000, - success : function(result) - { + success: function (result) { //检查驱动 - if(type == "0") - { + if (type == "0") { getWebServerInfoCallBack(result, paramArray, isFPLogin); } //检查动态库连接 - else if(type == "1") - { - getDLLConnectCallBack(result,isComp); + else if (type == "1") { + getDLLConnectCallBack(result, isComp); } - + }, - error : function(XMLHttpRequest, textStatus, errorThrown) - { - - } + error: function (XMLHttpRequest, textStatus, errorThrown) { + + } }); } @@ -202,34 +179,28 @@ * @param type 0 表示发送完请求后,还有别的操作。1 表示发送完请求后,没有其余的操作了 * @create 2013-08-09 17:24:31 pm */ -function getWebServerInfoForSimple(paramArray, isFPLogin, type) -{ +function getWebServerInfoForSimple(paramArray, isFPLogin, type) { //创建XDomainRequest实例,用于ie8和ie9跨域访问 var xDomainRequest = new XDomainRequest(); //如果xDomainRequest存在,则可以使用xDomainRequest函数,否则,说明不是ie浏览器 - if (xDomainRequest) - { - xDomainRequest.open('GET', issOnlineUrl+"/info?random="+getRandomNum()); - xDomainRequest.onload = function() - { + if (xDomainRequest) { + xDomainRequest.open('GET', issOnlineUrl + "/info?random=" + getRandomNum()); + xDomainRequest.onload = function () { //检查驱动 - if(type == "0") - { + if (type == "0") { getInfoForSimpleCallBack(xDomainRequest, paramArray, isFPLogin); } //检查动态库连接 - else if(type == "1") - { - getDLLConnectCallBack(xDomainRequest,isComp); + else if (type == "1") { + getDLLConnectCallBack(xDomainRequest, isComp); } - }; - xDomainRequest.onerror = function() - { + }; + xDomainRequest.onerror = function () { //用完后,将对象置为空 xDomainRequest = null; }; - xDomainRequest.send(); - } + xDomainRequest.send(); + } } @@ -238,21 +209,17 @@ * @author wenxin * @create 2013-08-09 17:24:31 pm */ -function getWebServerInfoCallBack(result, paramArray, isFPLogin) -{ +function getWebServerInfoCallBack(result, paramArray, isFPLogin) { //返回码 var ret = null; ret = result.ret; //接口调用成功返回时 - if(ret == 0) - { - if(isFPLogin) - { + if (ret == 0) { + if (isFPLogin) { //显示指纹登录 showFPVerify(paramArray); } - else - { + else { //显示登记--可以点击采集指纹 showRegister(paramArray); //计算指纹数量${pers_person_templateCount}:指纹数 @@ -260,11 +227,11 @@ //鼠标over事件 //mouseOverEvent(); // 对比指纹驱动 - if (result.data&&result.data.server_version){ - compareFPDriver(result.data.server_version); + if (result.data && result.data.server_version) { + compareFPDriver(result.data.server_version); } } - + } } @@ -274,8 +241,7 @@ * @create 2013-06-14 10:09:20 am * @param paramArray 存放国际化元素的数组 */ -function showFPVerify(paramArray) -{ +function showFPVerify(paramArray) { $("#userLoginForm .but_fing_disabled").hide(); $("#userLoginForm .but_fing").show(); } @@ -286,14 +252,13 @@ * @create 2013-06-14 10:09:20 am * @param paramArray 存放国际化元素的数组 */ -function showRegister(paramArray) -{ +function showRegister(paramArray) { var hrefStr = ""; - var param = '"'+paramArray[0]+'", "'+paramArray[1]+'", "'+paramArray[2]+'", '+null+''; + var param = '"' + paramArray[0] + '", "' + paramArray[1] + '", "' + paramArray[2] + '", ' + null + ''; $("#fpRegister").remove(); $("#downloadDriver").remove(); //webservice接口调用成功,说明驱动已经安装 - hrefStr = "<a id='fpRegister' onclick='submitRegister("+param+", true"+")' title='"+paramArray[3]+"' class='linkStyle'>"+paramArray[3]+"</a>"; + hrefStr = "<button id='fpRegister' onclick='submitRegister(" + param + ", true" + ")' title='" + paramArray[3] + "' class='linkStyle'>" + paramArray[3] + "</button>"; $("#fpRegisterDiv").append(hrefStr); } @@ -303,9 +268,8 @@ * @create 2013-04-25 11:31:20 am * */ -function showFPCountInit(fingerIdCount, text) -{ - $("#fpCountMessage").text(text +" "+ fingerIdCount); +function showFPCountInit(fingerIdCount, text) { + $("#fpCountMessage").text(text + " " + fingerIdCount); } /** @@ -314,28 +278,23 @@ * @param oldVersion 旧驱动版本 * @create 2015-01-28 17:24:31 pm */ -function compareFPDriver(oldVersion) -{ - var existVersion = fpDriverVersion +function compareFPDriver(oldVersion) { + var existVersion = fpDriverVersion var curVersion = oldVersion;//3.5.2 var existVersionArr = existVersion.split("."); var curVersionArr = curVersion.split("."); var isLast = true; var len = existVersionArr.length; - for(var i=len;i>0;i--) - { - var existVersionTemp = parseInt(existVersionArr[i-1]); - var curVersionTemp = parseInt(curVersionArr[i-1]); - if(existVersionTemp<curVersionTemp) - { + for (var i = len; i > 0; i--) { + var existVersionTemp = parseInt(existVersionArr[i - 1]); + var curVersionTemp = parseInt(curVersionArr[i - 1]); + if (existVersionTemp < curVersionTemp) { isLast = false; } - else if(existVersionTemp>curVersionTemp) - { + else if (existVersionTemp > curVersionTemp) { isLast = true; } - else - { + else { //等于 忽略 } } @@ -345,9 +304,9 @@ * @author gordon.zhang * @create 2015-01-28 17:24:31 pm */ -function showNewDriver(){ - var hrefStr = "<a id='downloadDriver' href='base/middleware/zkbioonline.exe' title='下载新驱动'>下载新驱动</a>"; - $("#driverDownload").append(hrefStr); +function showNewDriver() { + var hrefStr = "<a id='downloadDriver' href='base/middleware/zkbioonline.exe' title='下载新驱动'>下载新驱动</a>"; + $("#driverDownload").append(hrefStr); } /** @@ -357,32 +316,27 @@ * @param isFPLogin 是否是指纹登录 true:是;false:否 * @create 2013-08-09 17:43:31 pm */ -function getInfoForSimpleCallBack(xDomainRequest, paramArray, isFPLogin) -{ +function getInfoForSimpleCallBack(xDomainRequest, paramArray, isFPLogin) { //获取接口返回值 var resultData = xDomainRequest.responseText; //转化为json对象 var obj = jQuery.parseJSON(resultData); //返回码 var ret = null; - if(obj != null && obj.ret != undefined) - { + if (obj != null && obj.ret != undefined) { ret = obj.ret; } //接口调用成功返回时 - if(ret == 0) - { - if(isFPLogin) - { + if (ret == 0) { + if (isFPLogin) { //显示指纹比对 showFPVerify(paramArray); } - else - { + else { //显示登记--点击采集指纹 showRegister(paramArray); //计算指纹数量${pers_person_templateCount}:指纹数 - + showFPCountInit(paramArray[5], paramArray[6]); //鼠标over事件 //mouseOverEvent(); @@ -402,37 +356,32 @@ * @param downloadText 驱动安装国际化内容 * @param isDriverInstall 是否安装了驱动 */ -function submitRegister(title, fpCount, saveText, downloadText, isDriverInstall) -{ +function submitRegister(title, fpCount, saveText, downloadText, isDriverInstall) { //支持html5 - if (typeof(Worker) !== "undefined" && isDriverInstall) - { - var box=document.getElementById("box"); - var bg=document.getElementById("bg"); - box.style.display="block";//显示内容层,显示覆盖层 - box.style.left=parseInt((document.documentElement.scrollWidth-box.offsetWidth)/2)+document.documentElement.scrollLeft+"px"; - box.style.top=Math.abs(parseInt((document.documentElement.clientHeight-box.offsetHeight)/2))+document.documentElement.scrollTop+"px"; //为内容层设置位置 - bg.style.display="block"; - bg.style.height=document.documentElement.scrollHeight+"px"; - isComp=false; - dataInitReg(); - //关闭页面时,提示保存数据 + if (typeof (Worker) !== "undefined" && isDriverInstall) { + var box = document.getElementById("box"); + var bg = document.getElementById("bg"); + box.style.display = "block";//显示内容层,显示覆盖层 + box.style.left = parseInt((document.documentElement.scrollWidth - box.offsetWidth) / 2) + document.documentElement.scrollLeft + "px"; + box.style.top = Math.abs(parseInt((document.documentElement.clientHeight - box.offsetHeight) / 2)) + document.documentElement.scrollTop + "px"; //为内容层设置位置 + bg.style.display = "block"; + bg.style.height = document.documentElement.scrollHeight + "px"; + isComp = false; + dataInitReg(); + //关闭页面时,提示保存数据 //storeBeforeClose(fpCount, saveText); - } - else if(typeof(Worker) == "undefined" && isDriverInstall) - { - //createWindow('base_baseFPRegisterSimple.action?random=' + getRandomNum() + '^0^0^465^460^' + title);//public/html/applet.html - showModalDialog('webapp/html/baseFPRegisterSimple.html',title,'dialogWidth:465px;dialogHeight:460px;dialogLeft:600px;dialogTop:150px;center:yes;resizable:no;status:yes'); - //关闭页面时,提示保存数据 + } + else if (typeof (Worker) == "undefined" && isDriverInstall) { + //createWindow('base_baseFPRegisterSimple.action?random=' + getRandomNum() + '^0^0^465^460^' + title);//public/html/applet.html + showModalDialog('webapp/html/baseFPRegisterSimple.html', title, 'dialogWidth:465px;dialogHeight:460px;dialogLeft:600px;dialogTop:150px;center:yes;resizable:no;status:yes'); + //关闭页面时,提示保存数据 //storeBeforeClose(fpCount, saveText); - } - else if(!isDriverInstall) - { + } + else if (!isDriverInstall) { alert("请安装指纹驱动或启动该服务!"); //messageBox({messageType: "alert", title: "提示", text: "请安装指纹驱动或启动该服务!"}); - if(typeof($("#downloadDriver").val()) == "undefined") - { - var hrefStr = "<a id='downloadDriver' href='webapp/middleware/zkbioonline.exe' title='" + downloadText + "'>"+downloadText+"</a>"; + if (typeof ($("#downloadDriver").val()) == "undefined") { + var hrefStr = "<a id='downloadDriver' href='webapp/middleware/zkbioonline.exe' title='" + downloadText + "'>" + downloadText + "</a>"; $("#driverDownload").append(hrefStr); } } @@ -446,22 +395,19 @@ * @param fpCount 指纹数国际化内容 * @param saveText 提示:是否保存国际化内容 */ -function storeBeforeClose(fpCount, saveText) -{ - //关闭页面时,监听关闭的onclick事件 - getCurrentWindow().button("close").attachEvent("onClick", function(){ +function storeBeforeClose(fpCount, saveText) { + //关闭页面时,监听关闭的onclick事件 + getCurrentWindow().button("close").attachEvent("onClick", function () { //判断是否修改了数据(包括新增和删除) - if ($("#whetherModify").val() != undefined && (fpModifyFlag != undefined && fpModifyFlag)) - { + if ($("#whetherModify").val() != undefined && (fpModifyFlag != undefined && fpModifyFlag)) { //获取指纹标记数据 var fingerIdData = fingerIdArray; //获取指纹模板数据 var fingerTemplateData = templateDataArray; - var flag=confirm(saveText); + var flag = confirm(saveText); saveFPData(flag, fpCount); } - else - { + else { //取消采集 cancelRegister(); //将定时器的递归调用关闭 @@ -478,21 +424,19 @@ * @create 2013-05-13 10:18:31 am * @param */ -function getDataFromPage() -{ - var fingerId = $("#fingerId").val(); - var fingerTemplate = $("#fingerTemplate10").val(); - //如果有数据 - if($.trim(fingerId) != "") - { - fingerId = fingerId.substr(1, fingerId.length-2); - fingerTemplate = fingerTemplate.substr(1, fingerTemplate.length-2); - fingerIdArray = fingerId.split(","); - templateDataArray = fingerTemplate.split(","); - }else{ - fingerIdArray=new Array(); - templateDataArray=new Array(); - } +function getDataFromPage() { + var fingerId = $("#fingerId").val(); + var fingerTemplate = $("#fingerTemplate10").val(); + //如果有数据 + if ($.trim(fingerId) != "") { + fingerId = fingerId.substr(1, fingerId.length - 2); + fingerTemplate = fingerTemplate.substr(1, fingerTemplate.length - 2); + fingerIdArray = fingerId.split(","); + templateDataArray = fingerTemplate.split(","); + } else { + fingerIdArray = new Array(); + templateDataArray = new Array(); + } } /** @@ -500,21 +444,20 @@ * @author wenxin * @create 2013-06-15 15:40:31 pm */ -function initCoordJson() -{ - var coordJson = [{"num" : 0, "coord" : {"x" : x + 3, "y" : y - 37}}, - {"num" : 1, "coord" : {"x" : x + 25, "y" : y - 37}}, - {"num" : 2, "coord" : {"x" : x + 47, "y" : y - 34}}, - {"num" : 3, "coord" : {"x" : x + 67, "y" : y - 26}}, - {"num" : 4, "coord" : {"x" : x + 77, "y" : y + 18}}, - {"num" : 5, "coord" : {"x" : x + 153, "y" : y + 34}}, - {"num" : 6, "coord" : {"x" : x + 159, "y" : y - 19}}, - {"num" : 7, "coord" : {"x" : x + 177, "y" : y - 30}}, - {"num" : 8, "coord" : {"x" : x + 198, "y" : y - 36}}, - {"num" : 9, "coord" : {"x" : x + 220, "y" : y - 36}}, - {"num" : 10, "coord" : {"x" : x, "y" : y}}, - {"num" : 11, "coord" : {"x" : x + 170, "y" : y + 12}}, - {"num" : 12, "coord" : {"x" : x + 210, "y" : y - 346}}]; +function initCoordJson() { + var coordJson = [{ "num": 0, "coord": { "x": x + 3, "y": y - 37 } }, + { "num": 1, "coord": { "x": x + 25, "y": y - 37 } }, + { "num": 2, "coord": { "x": x + 47, "y": y - 34 } }, + { "num": 3, "coord": { "x": x + 67, "y": y - 26 } }, + { "num": 4, "coord": { "x": x + 77, "y": y + 18 } }, + { "num": 5, "coord": { "x": x + 153, "y": y + 34 } }, + { "num": 6, "coord": { "x": x + 159, "y": y - 19 } }, + { "num": 7, "coord": { "x": x + 177, "y": y - 30 } }, + { "num": 8, "coord": { "x": x + 198, "y": y - 36 } }, + { "num": 9, "coord": { "x": x + 220, "y": y - 36 } }, + { "num": 10, "coord": { "x": x, "y": y } }, + { "num": 11, "coord": { "x": x + 170, "y": y + 12 } }, + { "num": 12, "coord": { "x": x + 210, "y": y - 346 } }]; return coordJson; } @@ -526,10 +469,8 @@ * @param x, y 绘画手指的起点的坐标 * @param num 手指、手掌编号0-9:手指编号;10:左手掌,11:右手掌,12:圆弧。 */ -function initCoordArray(coordArray, x, y, num) -{ - if(num == 0) - { +function initCoordArray(coordArray, x, y, num) { + if (num == 0) { coordArray[0] = new Coord(x, y); coordArray[1] = new Coord(x + 2, y - 35); coordArray[2] = new Coord(x + 5, y - 40); @@ -542,8 +483,7 @@ coordArray[9] = new Coord(x + 3, y + 5); coordArray[10] = new Coord(x, y); } - else if(num == 1) - { + else if (num == 1) { coordArray[0] = new Coord(x, y); coordArray[1] = new Coord(x + 8, y - 50); coordArray[2] = new Coord(x + 12, y - 54); @@ -556,8 +496,7 @@ coordArray[9] = new Coord(x + 3, y + 4); coordArray[10] = new Coord(x, y); } - else if(num == 2) - { + else if (num == 2) { coordArray[0] = new Coord(x, y); coordArray[1] = new Coord(x + 14, y - 54); coordArray[2] = new Coord(x + 16, y - 57); @@ -570,8 +509,7 @@ coordArray[9] = new Coord(x + 1, y + 5); coordArray[10] = new Coord(x, y); } - else if(num == 3) - { + else if (num == 3) { coordArray[0] = new Coord(x, y); coordArray[1] = new Coord(x + 19, y - 37); coordArray[2] = new Coord(x + 21, y - 39); @@ -584,7 +522,7 @@ coordArray[9] = new Coord(x + 1, y + 6); coordArray[10] = new Coord(x, y); } - else if(num == 4){ + else if (num == 4) { coordArray[0] = new Coord(x, y); coordArray[1] = new Coord(x + 30, y - 18); coordArray[2] = new Coord(x + 34, y - 17); @@ -598,8 +536,7 @@ coordArray[10] = new Coord(x - 2, y + 8); coordArray[11] = new Coord(x, y); } - else if(num == 5) - { + else if (num == 5) { coordArray[0] = new Coord(x, y); coordArray[1] = new Coord(x - 26, y - 21); coordArray[2] = new Coord(x - 27, y - 24); @@ -612,8 +549,7 @@ coordArray[9] = new Coord(x + 7, y + 1); coordArray[10] = new Coord(x, y); } - else if(num == 6) - { + else if (num == 6) { coordArray[0] = new Coord(x, y); coordArray[1] = new Coord(x - 17, y - 46); coordArray[2] = new Coord(x - 17, y - 50); @@ -626,8 +562,7 @@ coordArray[9] = new Coord(x + 4, y + 2); coordArray[10] = new Coord(x, y); } - else if(num == 7) - { + else if (num == 7) { coordArray[0] = new Coord(x, y); coordArray[1] = new Coord(x - 12, y - 54); coordArray[2] = new Coord(x - 10, y - 58); @@ -640,8 +575,7 @@ coordArray[9] = new Coord(x + 5, y + 4); coordArray[10] = new Coord(x, y); } - else if(num == 8) - { + else if (num == 8) { coordArray[0] = new Coord(x, y); coordArray[1] = new Coord(x - 5, y - 50); coordArray[2] = new Coord(x - 2, y - 54); @@ -654,8 +588,7 @@ coordArray[9] = new Coord(x + 4, y + 5); coordArray[10] = new Coord(x, y); } - else if(num == 9) - { + else if (num == 9) { coordArray[0] = new Coord(x, y); coordArray[1] = new Coord(x, y - 37); coordArray[2] = new Coord(x + 3, y - 41); @@ -668,8 +601,7 @@ coordArray[9] = new Coord(x + 3, y + 4); coordArray[10] = new Coord(x, y); } - else if(num == 10) - { + else if (num == 10) { coordArray[0] = new Coord(x, y); coordArray[1] = new Coord(x + 2, y - 8); coordArray[2] = new Coord(x + 6, y - 16); @@ -680,7 +612,7 @@ coordArray[7] = new Coord(x + 64, y - 16); coordArray[8] = new Coord(x + 69, y - 11); coordArray[9] = new Coord(x + 73, y - 3); - + coordArray[10] = new Coord(x + 73, y + 10); coordArray[11] = new Coord(x + 71, y + 18); coordArray[12] = new Coord(x + 57, y + 40); @@ -693,8 +625,7 @@ coordArray[19] = new Coord(x + 2, y + 29); coordArray[20] = new Coord(x, y); } - else if(num == 11) - { + else if (num == 11) { coordArray[0] = new Coord(x, y); coordArray[1] = new Coord(x - 2, y - 10); coordArray[2] = new Coord(x + 1, y - 20); @@ -705,7 +636,7 @@ coordArray[7] = new Coord(x + 68, y - 26); coordArray[8] = new Coord(x + 72, y - 16); coordArray[9] = new Coord(x + 72, y + 13); - + coordArray[10] = new Coord(x + 68, y + 22); coordArray[11] = new Coord(x + 62, y + 29); coordArray[12] = new Coord(x + 60, y + 30); @@ -715,8 +646,7 @@ coordArray[16] = new Coord(x + 16, y + 29); coordArray[17] = new Coord(x, y); } - else if(num == 12) - { + else if (num == 12) { coordArray[0] = new Coord(x - 10, y); coordArray[1] = new Coord(x + 212, y); coordArray[2] = new Coord(x + 212, y + 129); @@ -727,7 +657,7 @@ coordArray[7] = new Coord(x + 142, y + 127); coordArray[8] = new Coord(x + 133, y + 125); coordArray[9] = new Coord(x + 114, y + 120); - + coordArray[10] = new Coord(x + 97, y + 113); coordArray[11] = new Coord(x + 86, y + 108); coordArray[12] = new Coord(x + 72, y + 100); @@ -746,8 +676,7 @@ * @author wenxin * @create 2013-05-31 18:01:33 pm */ -var Coord = function(x, y) -{ +var Coord = function (x, y) { this.x = x; this.y = y; } @@ -761,40 +690,31 @@ * @param renderFlag 渲染标记 stroke:绘画边线;fill:填充 * @param color 渲染颜色 */ -var renderFinger = function(context, pointArray) -{ +var renderFinger = function (context, pointArray) { this.context = context; this.pointArray = pointArray; this.isClick = false; - this.drawFinger = function(renderFlag, color) - { - if(renderFlag == "stroke") - { + this.drawFinger = function (renderFlag, color) { + if (renderFlag == "stroke") { this.context.strokeStyle = color; } - else if(renderFlag == "fill") - { + else if (renderFlag == "fill") { this.context.fillStyle = color; } this.context.lineWidth = 1; this.context.beginPath(); - for(var i=0; i<this.pointArray.length; i++) - { - if(i == 0) - { + for (var i = 0; i < this.pointArray.length; i++) { + if (i == 0) { this.context.moveTo(this.pointArray[0].x, this.pointArray[0].y); } - else - { + else { this.context.lineTo(this.pointArray[i].x, this.pointArray[i].y); } } - if(renderFlag == "stroke") - { + if (renderFlag == "stroke") { this.context.stroke(); } - else if(renderFlag == "fill") - { + else if (renderFlag == "fill") { this.context.fill(); } }; @@ -808,36 +728,28 @@ * @param num 当前需要渲染的手指编号 * @param browserFlag 浏览器标记 simple:简易版本,表示是ie浏览器;html5:表示支持html5的浏览器 */ -function renderInit(context, num, browserFlag) -{ +function renderInit(context, num, browserFlag) { var fingerId; - for(var i=0; i<fingerIdArray.length; i++) - { + for (var i = 0; i < fingerIdArray.length; i++) { fingerId = eval(fingerIdArray[i]); - if(fingerId >= DURESS_FINGER_NUM) - { - fingerId = fingerId -DURESS_FINGER_NUM; - if(browserFlag == "html5") - { - if(fingerId == num) - { + if (fingerId >= DURESS_FINGER_NUM) { + fingerId = fingerId - DURESS_FINGER_NUM; + if (browserFlag == "html5") { + if (fingerId == num) { context.fillStyle = "red"; context.fill(); - } + } } } - else - { - if(browserFlag == "html5"){ - if(fingerId == num) - { + else { + if (browserFlag == "html5") { + if (fingerId == num) { context.fillStyle = "rgb(122,193,66)"; context.fill(); } } } - if(browserFlag == "simple") - { + if (browserFlag == "simple") { document.getElementById("finger" + fingerId).checked = true; } } @@ -850,16 +762,15 @@ * @param context 2d画布上下文 * @param browserFlag 浏览器标记 simple:简易版本,表示是ie浏览器;html5:表示支持html5的浏览器 */ -function showImage(context, base64FPImg, browserFlag) -{ +function showImage(context, base64FPImg, browserFlag) { var img; - var imgSrc = "data:image/jpg;base64,"+base64FPImg; - if(browserFlag == "html5"){ + var imgSrc = "data:image/jpg;base64," + base64FPImg; + if (browserFlag == "html5") { img = new Image(); //img.src = sysCfg.rootPath + "/public/html/bmpFile1.jpg"; img.src = ""; img.src = imgSrc; - img.onload=function() { + img.onload = function () { // 保存当前的绘图状态 context.save(); // 开始创建路径 @@ -871,17 +782,16 @@ // 剪切路径 context.clip(); //将图片画到画布上 - context.drawImage(img, 70, 70, 112, 145); + context.drawImage(img, 70, 70, 112, 145); //调用restore最后一次存储的状态会被恢复 - context.restore(); - } + context.restore(); + } } - else if(browserFlag == "verification") - { + else if (browserFlag == "verification") { img = new Image(); img.src = ""; img.src = imgSrc; - img.onload=function() { + img.onload = function () { // 保存当前的绘图状态 context.save(); // 开始创建路径 @@ -893,28 +803,25 @@ // 剪切路径 context.clip(); //将图片画到画布上 - context.drawImage(img, 37, 90, 112, 145); + context.drawImage(img, 37, 90, 112, 145); //调用restore最后一次存储的状态会被恢复 - context.restore(); - } + context.restore(); + } } - else if(browserFlag == "clearForVerify" || browserFlag == "clearForRegister") - { + else if (browserFlag == "clearForVerify" || browserFlag == "clearForRegister") { img = new Image(); img.src = ""; img.src = base64FPImg; - img.onload=function() { + img.onload = function () { // 保存当前的绘图状态 context.save(); // 开始创建路径 context.beginPath(); // 画一个椭圆 - if(browserFlag == "clearForVerify") - { + if (browserFlag == "clearForVerify") { context.oval(91, 160, 112, 145); } - else if(browserFlag == "clearForRegister") - { + else if (browserFlag == "clearForRegister") { context.oval(125, 142, 132, 165); } // 关闭路径 @@ -922,29 +829,24 @@ // 剪切路径 context.clip(); //将图片画到画布上 - if(browserFlag == "clearForVerify") - { + if (browserFlag == "clearForVerify") { context.drawImage(img, 12, 54, 160, 213); } - else if(browserFlag == "clearForRegister") - { - context.drawImage(img, 60, 60, 132, 165); - } + else if (browserFlag == "clearForRegister") { + context.drawImage(img, 60, 60, 132, 165); + } //调用restore最后一次存储的状态会被恢复 - context.restore(); - } + context.restore(); + } } - else if(browserFlag == "simple") - { - $("#showFPImageDiv").html("<img src="+imgSrc+" width='112' height='145' />"); + else if (browserFlag == "simple") { + $("#showFPImageDiv").html("<img src=" + imgSrc + " width='112' height='145' />"); } - else if(browserFlag == "verifySimple") - { + else if (browserFlag == "verifySimple") { $("#showSeachingDiv").show(); $("#showSeachingDiv").html(" <img src=\"/public/images/searching.gif\" width='20' height='20'/></br><label style='color:yellow;align:center;font-size: 14px;'>处理中...</label>"); } - else if(browserFlag == "clearForSimple") - { + else if (browserFlag == "clearForSimple") { $("#showFPImageDiv").html(""); } } @@ -957,24 +859,19 @@ * @param pointArray 坐标点数组 * @param color 渲染颜色 */ -var renderHand = function(context, pointArray) -{ +var renderHand = function (context, pointArray) { this.context = context; this.pointArray = pointArray; this.isClick = false; - this.drawHand = function(color) - { + this.drawHand = function (color) { this.context.strokeStyle = color; this.context.lineWidth = 1; this.context.beginPath(); - for(var i=0; i<this.pointArray.length; i++) - { - if(i == 0) - { + for (var i = 0; i < this.pointArray.length; i++) { + if (i == 0) { this.context.moveTo(this.pointArray[0].x, this.pointArray[0].y); } - else - { + else { this.context.lineTo(this.pointArray[i].x, this.pointArray[i].y); } } @@ -990,38 +887,31 @@ * @param paramArray 存放国际化元素的数组 * @param browserFlag 浏览器标记 simple:简易版本,表示是ie浏览器;html5:表示支持html5的浏览器 */ -function checkFPReader(context, paramArray, browserFlag) -{ - if(browserFlag == "html5") - { - $.ajax( { - type : "GET", - url : issOnlineUrl+"/fingerprint/beginCapture?type=1&FakeFunOn=0&random="+getRandomNum(), - dataType : "json", +function checkFPReader(context, paramArray, browserFlag) { + if (browserFlag == "html5") { + $.ajax({ + type: "GET", + url: issOnlineUrl + "/fingerprint/beginCapture?type=1&FakeFunOn=0&random=" + getRandomNum(), + dataType: "json", async: false, //timeout:1000, - success : function(result) - { + success: function (result) { //返回码 var ret = null; ret = result.ret; //接口调用成功返回时 - if(ret == 0) - { + if (ret == 0) { //显示框--采集提示 collectTips(context, paramArray[0], "html5"); } - else if(ret == -2001) - { + else if (ret == -2001) { //显示框--采集提示 collectTips(context, paramArray[1], "html5"); } - else if(ret == -2002) - { + else if (ret == -2002) { getWebServerInfo(null, null, "1"); } - else if(ret == -2005) - { + else if (ret == -2005) { //显示框--采集提示 collectTips(context, paramArray[3], "html5"); } @@ -1029,59 +919,50 @@ //取消采集 cancelRegister(); }, - error : function(XMLHttpRequest, textStatus, errorThrown) - { + error: function (XMLHttpRequest, textStatus, errorThrown) { alert("请安装指纹驱动或启动该服务!"); //messageBox({messageType: "alert", title: "${common_prompt_title}", text: "${base_fp_connectPrompt}"}); - } + } }); } - else if(browserFlag == "simple") - { + else if (browserFlag == "simple") { //创建XDomainRequest实例,用于ie8和ie9跨域访问 var xDomainRequest = new XDomainRequest(); //如果xDomainRequest存在,则可以使用xDomainRequest函数,否则,说明不是ie浏览器 - if (xDomainRequest) - { - xDomainRequest.open('GET', issOnlineUrl+"/fingerprint/beginCapture?type=1&FakeFunOn=0&random="+getRandomNum()); - xDomainRequest.onload = function() - { + if (xDomainRequest) { + xDomainRequest.open('GET', issOnlineUrl + "/fingerprint/beginCapture?type=1&FakeFunOn=0&random=" + getRandomNum()); + xDomainRequest.onload = function () { //获取接口返回值 var resultData = xDomainRequest.responseText; //转化为json对象 var obj = jQuery.parseJSON(resultData); //返回码 var ret = null; - if(obj != null && obj.ret != undefined) - { + if (obj != null && obj.ret != undefined) { ret = obj.ret; } //接口调用成功返回时 - if(ret == 0) - { + if (ret == 0) { //显示框--采集提示 collectTips(null, paramArray[0], "simple"); } - else if(ret == -2001) - { + else if (ret == -2001) { //显示框--采集提示 collectTips(null, paramArray[1], "simple"); } - else if(ret == -2002) - { + else if (ret == -2002) { getWebServerInfoForSimple(null, null, "1"); } collectFlag = true; //取消采集 cancelRegister(); - }; - xDomainRequest.onerror = function() - { + }; + xDomainRequest.onerror = function () { //用完后,将对象置为空 xDomainRequest = null; }; - xDomainRequest.send(); - } + xDomainRequest.send(); + } } } @@ -1094,63 +975,58 @@ * @param browserFlag 浏览器标记或比对验证标记 simple:简易版本,表示是ie浏览器;html5:表示支持html5的浏览器 * --verification:指纹验证标记 */ -function collectTips(context, text, browserFlag) -{ - if(browserFlag == "simple") - { - $("#showCollInfoDiv").html("<span style='color:rgb(122,193,66); font-size: 12px;word-break: break-all; word-wrap: break-word;'>"+text+"</span>"); +function collectTips(context, text, browserFlag) { + if (browserFlag == "simple") { + $("#showCollInfoDiv").html("<span style='color:rgb(122,193,66); font-size: 12px;word-break: break-all; word-wrap: break-word;'>" + text + "</span>"); } - else if(browserFlag == "html5") - { + else if (browserFlag == "html5") { context.fillStyle = bgColor;//bgColor; context.fillRect(205, 18, 240, 16); - + //文字右对齐 context.fillStyle = "rgb(122,193,66)"; - context.font ="12px Arial,微软雅黑"; + context.font = "12px Arial,微软雅黑"; //context.shadowColor = 'white'; - //context.shadowBlur = 10; - //context.strokeText(text, 230, 30); + //context.shadowBlur = 10; + //context.strokeText(text, 230, 30); context.textAlign = "end"; context.fillText(text, 400, 30); } - else if(browserFlag == "verification") - { + else if (browserFlag == "verification") { //#6BA5D7 context.fillStyle = "#F3F5F0";//#6BA5D7 context.fillRect(2, 8, 600, 30); //获取canvas对象 - var canvas =""; - if(isComp){ + var canvas = ""; + if (isComp) { canvas = document.getElementById("canvasComp"); - }else{ + } else { canvas = document.getElementById("canvas"); } -// canvas.width = canvas.width; + // canvas.width = canvas.width; //返回一个文本的度量信息对象metrics var metrics = context.measureText(text); //文本宽度 var textWidth = metrics.width; //canvas宽度 - canvas != null?canvasWidth = canvas.width:canvasWidth = 450; + canvas != null ? canvasWidth = canvas.width : canvasWidth = 450; //文本开始x坐标 - var x = textWidth/2 + (canvasWidth - textWidth)/2; - - + var x = textWidth / 2 + (canvasWidth - textWidth) / 2; + + //context.fillStyle = bgColor; //context.fillRect(0, 18, 445, 16); - + //文字右对齐 context.fillStyle = "rgb(122,193,66)"; - context.font ="24px Arial,微软雅黑"; + context.font = "24px Arial,微软雅黑"; context.textAlign = "center"; //自动换行 - autoWordBreak(context,text,canvasWidth,x); + autoWordBreak(context, text, canvasWidth, x); context.restore(); } - else if(browserFlag == "verifyForSimple") - { - $("#showCollInfoDiv").html("<span style='color:yellow;align:center;font-size: 18px;word-break: break-all; word-wrap: break-word;'>"+text+"</span>"); + else if (browserFlag == "verifyForSimple") { + $("#showCollInfoDiv").html("<span style='color:yellow;align:center;font-size: 18px;word-break: break-all; word-wrap: break-word;'>" + text + "</span>"); } } @@ -1161,39 +1037,34 @@ * @param context 2d画布上下文 * @param x,y,width,height 进度条底框的坐标和宽度、高度 */ -function drawProgressBar(context, collCount) -{ +function drawProgressBar(context, collCount) { var x = 300; var y = 60; var width = 90; var height = 20; context.fillStyle = bgColor; context.fillRect(x, y, width, height); - if(collCount == 0) - { + if (collCount == 0) { context.fillStyle = "rgb(175,181,185)"; context.fillRect(x + 4, y + 2, width - 52, height - 4); - context.fillRect(x + 46, y + 2, width -52, height - 4); + context.fillRect(x + 46, y + 2, width - 52, height - 4); context.fillRect(x + 86, y + 2, width - 52, height - 4); } - else if(collCount == 1) - { + else if (collCount == 1) { context.fillStyle = "rgb(122,193,66)"; context.fillRect(x + 4, y + 2, width - 52, height - 4); context.fillStyle = "rgb(175,181,185)"; context.fillRect(x + 46, y + 2, width - 52, height - 4); context.fillRect(x + 86, y + 2, width - 52, height - 4); } - else if(collCount == 2) - { + else if (collCount == 2) { context.fillStyle = "rgb(122,193,66)"; context.fillRect(x + 4, y + 2, width - 52, height - 4); context.fillRect(x + 46, y + 2, width - 52, height - 4); context.fillStyle = "rgb(175,181,185)"; context.fillRect(x + 86, y + 2, width - 52, height - 4); } - else if(collCount == 3) - { + else if (collCount == 3) { context.fillStyle = "rgb(122,193,66)"; context.fillRect(x + 4, y + 2, width - 52, height - 4); context.fillRect(x + 46, y + 2, width - 52, height - 4); @@ -1209,19 +1080,15 @@ * @param fingerIdArray 存放手指编号的数组 * @return 返回boolean值 true:num包含在fingerIdArray中;false:没有包含 */ -function isContains(fingerIdArray, num) -{ +function isContains(fingerIdArray, num) { var fingerId; var isCollected = false; - for(var j=0; j<fingerIdArray.length; j++) - { + for (var j = 0; j < fingerIdArray.length; j++) { fingerId = eval(fingerIdArray[j]); - if(fingerId >= DURESS_FINGER_NUM) - { - fingerId = fingerId -DURESS_FINGER_NUM; + if (fingerId >= DURESS_FINGER_NUM) { + fingerId = fingerId - DURESS_FINGER_NUM; } - if(fingerId == num) - { + if (fingerId == num) { isCollected = true; } } @@ -1233,18 +1100,14 @@ * @author wenxin * @create 2013-09-05 15:15:11 pm */ -function clearFPImage(context, browserFlag) -{ - if(browserFlag == "verification") - { -// showImage(context, "${base}/base/images/base_fpVerify_clearImage.png", "clearForVerify"); +function clearFPImage(context, browserFlag) { + if (browserFlag == "verification") { + // showImage(context, "${base}/base/images/base_fpVerify_clearImage.png", "clearForVerify"); } - else if(browserFlag == "register") - { + else if (browserFlag == "register") { showImage(context, "image/base_fpVerify_clearImage.png", "clearForRegister"); } - else if(browserFlag == "verifyForSimple" || browserFlag == "registerForSimple") - { + else if (browserFlag == "verifyForSimple" || browserFlag == "registerForSimple") { showImage(null, "", "clearForSimple"); } } @@ -1256,79 +1119,69 @@ * @param paramArray 存放国际化元素的数组 * @param flag 判断是登记和验证标记 register:登记;verification:验证 */ -function getFPTemplate(paramArray, flag) -{ +function getFPTemplate(paramArray, flag) { var fpTemplate = ""; var collectSuccessFlag = false; - $.ajax( { - type : "GET", - url : issOnlineUrl+"/fingerprint/getTemplate?random="+getRandomNum(), - dataType : "json", + $.ajax({ + type: "GET", + url: issOnlineUrl + "/fingerprint/getTemplate?random=" + getRandomNum(), + dataType: "json", async: false, - success : function(result) - { + success: function (result) { //返回码 var ret = null; ret = result.ret; - if(ret == 0) - { + if (ret == 0) { fpTemplate = result.data.template; + console.log('fpTemplate', fpTemplate) + window.top.postMessage({ + fingerCode: result.data.template, + }); } //成功 - if(ret == 0) - { + if (ret == 0) { collectSuccessFlag = true; - if(flag == "register") - { + if (flag == "register") { //判断手指是否已经采集指纹 var compareRet = ""; //如果前面已经录入指纹 - if(templateDataArray.length > 0) - { + if (templateDataArray.length > 0) { //发送请求,进行后台指纹比对yls //compareRet = fpComparision(fpTemplate, templateDataArray, paramArray[3]); } - if($.trim(compareRet) == "dllNotExist") - { + if ($.trim(compareRet) == "dllNotExist") { //采集完指纹,渲染手指 renderAfterColl(globalContext, fpIdNum, bgColor, false);//bgColor判断 //显示框--采集提示 collectTips(globalContext, "动态库加载失败", "html5"); } - else - { - if(compareRet == "noFingerServer") - { + else { + if (compareRet == "noFingerServer") { //采集完指纹,渲染手指 renderAfterColl(globalContext, fpIdNum, bgColor, false);//bgColor判断 //显示框--采集提示 collectTips(globalContext, "未启动比对服务", "html5"); } - else - { + else { //此手指未采集指纹 - if(compareRet != "ok") - { + if (compareRet != "ok") { //采集完指纹,渲染手指 renderAfterColl(globalContext, fpIdNum, bgColor, true);//bgColor判断 //显示框--采集提示 collectTips(globalContext, paramArray[0], "html5"); //胁迫指纹 - if(duressFingerFlag) - { + if (duressFingerFlag) { //将手指标记保存到数组中 fingerIdArray[fingerIdArray.length] = fpIdNum + DURESS_FINGER_NUM; } - else - { + else { //将手指标记保存到数组中 fingerIdArray[fingerIdArray.length] = fpIdNum; } //将指纹模板保存到数组中 templateDataArray[templateDataArray.length] = fpTemplate; } - else - { + else { //采集完指纹,渲染手指 renderAfterColl(globalContext, fpIdNum, bgColor, false);//bgColor判断 //Please don't repeat input fingerprint! @@ -1338,26 +1191,23 @@ } } } - else if(flag == "verification") - { + else if (flag == "verification") { verifyFlag = false; //指纹比对 fpComparison(fpTemplate); } } - else if(ret == -2003) - { + else if (ret == -2003) { //采集完指纹,渲染手指 renderAfterColl(globalContext, fpIdNum, bgColor, false); //显示框--采集提示 collectTips(globalContext, paramArray[1], "html5"); } }, - error : function(XMLHttpRequest, textStatus, errorThrown) - { + error: function (XMLHttpRequest, textStatus, errorThrown) { alert(paramArray[3]); //messageBox({messageType: "alert", title: "${common_prompt_title}", text: paramArray[3]}); - } + } }); return collectSuccessFlag; } @@ -1370,42 +1220,36 @@ * @param templateArray 指纹模板数组 * @param errorMsg ajax请求报错,错误信息 */ -function fpComparision(fpTemplate, templateArray, errorMsg) -{ +function fpComparision(fpTemplate, templateArray, errorMsg) { var ret = ""; var templates = templateArray.toString(); - console.log('fpTemplate',fpTemplate) + console.log('fpTemplate', fpTemplate) //特殊字符转义 fpTemplate = transferredMeaning(fpTemplate); templates = transferredMeaning(templates); - console.log('fpTemplate',fpTemplate) - $.ajax( { - type : "POST", - url : "baseBioVerifyAction!fpComparison.action", - contentType : "application/x-www-form-urlencoded;charset=UTF-8", - data : "verifyTemplate="+fpTemplate+"&templates="+templates, - dataType : "json", + console.log('fpTemplate', fpTemplate) + $.ajax({ + type: "POST", + url: "baseBioVerifyAction!fpComparison.action", + contentType: "application/x-www-form-urlencoded;charset=UTF-8", + data: "verifyTemplate=" + fpTemplate + "&templates=" + templates, + dataType: "json", async: false, - success : function(result) - { - if(result.ret == "ok") - { + success: function (result) { + if (result.ret == "ok") { ret = "ok"; } - if(result.msg == "noFingerServer") - { + if (result.msg == "noFingerServer") { ret = "noFingerServer"; } - if(result.msg == "dllNotExist") - { + if (result.msg == "dllNotExist") { ret = "dllNotExist"; } }, - error : function(XMLHttpRequest, textStatus, errorThrown) - { + error: function (XMLHttpRequest, textStatus, errorThrown) { alert("服务器处理数据失败,请重试!错误码:"); //messageBox({messageType: "alert", title: "${common_prompt_title}", text: "${common_prompt_serverError}"}); - } + } }); return ret; } @@ -1419,12 +1263,11 @@ * @param fillColor 采集完后填充颜色 * @param successOrNot 采集是否成功--布尔值 true:采集成功;false:采集失败 */ -function renderAfterColl(context, num, fillColor, successOrNot) -{ - var canvas=""; - if(isComp){ +function renderAfterColl(context, num, fillColor, successOrNot) { + var canvas = ""; + if (isComp) { canvas = document.getElementById("canvasComp"); - }else{ + } else { canvas = document.getElementById("canvas"); } var localContext = canvas.getContext("2d"); @@ -1432,35 +1275,29 @@ //初始化起始坐标,并返回json格式数据 var coordJson = initCoordJson(); //进来页面,点击删除 - if(num == null) - { + if (num == null) { num = fpIdNum; } //点击的手指编号和json中num相等 - if(coordJson[num].num == num) - { + if (coordJson[num].num == num) { //初始化坐标数组和绘画手指 initCoordAndDrawFinger(context, coordArray, coordJson[num].coord.x, coordJson[num].coord.y, num); } - + //采集成功,填充颜色(红、绿) - if(successOrNot) - { - if(duressFingerFlag) - { + if (successOrNot) { + if (duressFingerFlag) { localContext.fillStyle = "red";//fillColor localContext.fill(); fpModifyFlag = true; } - else - { + else { localContext.fillStyle = "rgb(122,193,66)";//fillColor localContext.fill(); fpModifyFlag = true; } } - else - { + else { //采集失败,填充背景色--消除颜色(黄) localContext.fillStyle = fillColor; localContext.fill(); @@ -1476,8 +1313,7 @@ * @param x,y 绘画当前手指的起始坐标 * @param num 手指标记 */ -function initCoordAndDrawFinger(context, coordArray, x, y, num) -{ +function initCoordAndDrawFinger(context, coordArray, x, y, num) { coordArray = initCoordArray(coordArray, x, y, num); new renderFinger(context, coordArray).drawFinger(strokeStyle, fingerBorderColor); } @@ -1488,12 +1324,9 @@ * @create 2013-05-15 17:21:13 pm * @param "${base_fp_save}":确认保存当前修改吗? */ -function cancelEvent(saveText, fpCountText) -{ - if(!fpModifyFlag) - { - if(collectFlag) - { +function cancelEvent(saveText, fpCountText) { + if (!fpModifyFlag) { + if (collectFlag) { //取消采集 cancelRegister(); //将定时器的递归调用关闭 @@ -1502,17 +1335,16 @@ //closeWindow(); close(); } - else - { - var flag=confirm(saveText); - if(flag){ + else { + var flag = confirm(saveText); + if (flag) { saveFPData(flag, fpCountText); - }else{ + } else { close(); } - + } - + } /** @@ -1524,24 +1356,20 @@ * @param fpCount 指纹数国际化内容 * @param ${pers_person_templateCount}:指纹数 */ -var saveFPData = function(result, fpCount) -{ - if(collectFlag) - { +var saveFPData = function (result, fpCount) { + if (collectFlag) { //取消采集 cancelRegister(); //将定时器的递归调用关闭 clearTimeout(timer); } - if(result) - { + if (result) { storeDataToHtml(); showFPCount(fpCount); //closeWindow(); close(); } - else - { + else { clearImageData(); //closeWindow(); close(); @@ -1553,15 +1381,12 @@ * @author wenxin * @create 2013-04-22 21:26:31 pm */ -function showFPCount(text) -{ +function showFPCount(text) { var fingerId = $("#fingerId").val(); - if($.trim(fingerId) == "") - { + if ($.trim(fingerId) == "") { $("#fpCountMessage").text(text + " " + 0); } - else - { + else { fingerId = fingerId.substr(1, fingerId.length - 2); var fingerIdArray = new Array(); fingerIdArray = fingerId.split(","); @@ -1574,36 +1399,31 @@ * @author wenxin * @create 2013-05-24 16:12:21 pm */ -function storeDataToHtml() -{ +function storeDataToHtml() { //没有手指标记数据 - if(fingerIdArray.length == 0) - { + if (fingerIdArray.length == 0) { $("#fingerId").val(" "); } - else - { + else { //将手指标记数据保存到页面 - $("#fingerId").val("["+fingerIdArray.toString()+"]"); + $("#fingerId").val("[" + fingerIdArray.toString() + "]"); } //没有指纹模板数据 - if(templateDataArray.length == 0) - { + if (templateDataArray.length == 0) { $("#fingerTemplate10").val(" "); } - else - { + else { //将指纹模板数据保存到页面 - $("#fingerTemplate10").val("["+templateDataArray.toString()+"]"); + $("#fingerTemplate10").val("[" + templateDataArray.toString() + "]"); } } //关闭窗体 -function close(){ +function close() { $("#bg").css("display", "none"); $("#box").css("display", "none"); $("#comparisonDiv").css("display", "none"); - globalContext=""; + globalContext = ""; } /** @@ -1615,30 +1435,23 @@ * @param context 2d画布上下文 * @param browserFlag 浏览器标记 simple:简易版本,表示是ie浏览器;html5:表示支持html5的浏览器 */ -var delFPData = function(result, context, browserFlag) -{ +var delFPData = function (result, context, browserFlag) { var fingerId; - if(result) - { + if (result) { //将数组中的指定元素删除 - for(var i=0; i<fingerIdArray.length; i++) - { + for (var i = 0; i < fingerIdArray.length; i++) { fingerId = eval(fingerIdArray[i]); - if(fingerId >= DURESS_FINGER_NUM) - { + if (fingerId >= DURESS_FINGER_NUM) { fingerId = fingerId - DURESS_FINGER_NUM; - if(fingerId == fpIdNum) - { + if (fingerId == fpIdNum) { //fingerIdArray.remove(i); //templateDataArray.remove(i); removeItem(fingerIdArray, i); removeItem(templateDataArray, i); } } - else - { - if(fingerId == fpIdNum) - { + else { + if (fingerId == fpIdNum) { //fingerIdArray.remove(i); //templateDataArray.remove(i); removeItem(fingerIdArray, i); @@ -1646,17 +1459,14 @@ } } } - if(browserFlag == "simple") - { + if (browserFlag == "simple") { document.getElementById("finger" + fingerId).checked = false; } - else if(browserFlag == "html5") - { + else if (browserFlag == "html5") { //将手指颜色改变--重画时也要判断 context.fillStyle = bgColor; context.fill(); - if(lastFPIdNum != null && lastFPIdNum != lastFPIdNum) - { + if (lastFPIdNum != null && lastFPIdNum != lastFPIdNum) { //消除原来手指的颜色 renderAfterColl(globalContext, lastFPIdNum, bgColor, false); } @@ -1667,15 +1477,12 @@ $("#duressFinger").attr("disabled", false); $("#submitButtonId").attr("disabled", false); } - else - { - if(browserFlag == "simple") - { + else { + if (browserFlag == "simple") { document.getElementById("finger" + fpIdNum).checked = true collectFlag = true; } - else if(browserFlag == "html5") - { + else if (browserFlag == "html5") { //消除原来手指的颜色--有问题,如果原来手指和现在的一样,有问题 //renderAfterColl(globalContext, lastFPIdNum, bgColor, false); } @@ -1688,9 +1495,8 @@ * @create 2013-05-15 11:11:31 am * @param dx 要删除元素的下标 */ -function removeItem(array, dx) -{ - array.splice(dx, 1); +function removeItem(array, dx) { + array.splice(dx, 1); } /** @@ -1701,38 +1507,36 @@ * @param isDriverInstall 是否安装了驱动 * @param downloadPrompt 提示安装驱动国际化内容 */ -function fpVerification(title, downloadPrompt, isDriverInstall,context) -{ +{/* <div id="comparison" style="display: inline" + onclick='fpVerification("指纹比对","请安装指纹驱动或启动服务",true,globalContext)'>比对</div> + <div></div> */} +function fpVerification(title, downloadPrompt, isDriverInstall, context) { //安装驱动 - if(isDriverInstall) - { + if (isDriverInstall) { //支持html5 - if(typeof(Worker) != "undefined") - { + if (typeof (Worker) != "undefined") { //createWindow('base_baseFPVerify.do?random=' + getRandomNum() + '^0^0^465^320^'+title); - var comparisonDiv=document.getElementById("comparisonDiv"); - var bg=document.getElementById("bg"); - comparisonDiv.style.display="block";//显示内容层,显示覆盖层 - comparisonDiv.style.left=parseInt((document.documentElement.scrollWidth-comparisonDiv.offsetWidth)/2)+document.documentElement.scrollLeft+"px"; - comparisonDiv.style.top=Math.abs(parseInt((document.documentElement.clientHeight-comparisonDiv.offsetHeight)/2))+document.documentElement.scrollTop+"px"; //为内容层设置位置 - bg.style.display="block"; - bg.style.height=document.documentElement.scrollHeight+"px"; - isComp= true; - //开始采集 - //beginCapture(context); - dataInitComp(); - //关闭页面前,取消采集 + var comparisonDiv = document.getElementById("comparisonDiv"); + var bg = document.getElementById("bg"); + comparisonDiv.style.display = "block";//显示内容层,显示覆盖层 + comparisonDiv.style.left = parseInt((document.documentElement.scrollWidth - comparisonDiv.offsetWidth) / 2) + document.documentElement.scrollLeft + "px"; + comparisonDiv.style.top = Math.abs(parseInt((document.documentElement.clientHeight - comparisonDiv.offsetHeight) / 2)) + document.documentElement.scrollTop + "px"; //为内容层设置位置 + bg.style.display = "block"; + bg.style.height = document.documentElement.scrollHeight + "px"; + isComp = true; + //开始采集 + //beginCapture(context); + dataInitComp(); + //关闭页面前,取消采集 //cancelCaptureBeforeClose("html5"); } - else - { + else { createWindow('base_baseFPVerifySimple.do?random=' + getRandomNum() + '^0^0^465^320^' + title); - //关闭页面前,取消采集 + //关闭页面前,取消采集 //cancelCaptureBeforeClose("simple"); } } - else - { + else { alert(downloadPrompt); //messageBox({messageType: "alert", title: "提示", text: downloadPrompt}); } @@ -1748,27 +1552,24 @@ * @param x 文本X坐标值 * */ -function autoWordBreak(context,text,CWidth,x){ +function autoWordBreak(context, text, CWidth, x) { context.clear(); var rownum = CWidth / 10; var len = strlen(text); - if (rownum > len) - { + if (rownum > len) { context.fillText(text, x, 30); } - else - { - var endInd = rownum<text.length?rownum:text.length; + else { + var endInd = rownum < text.length ? rownum : text.length; var beginInd = 0; - var endTemp=0; - for (var i = 0; i <= text.length / rownum; i++) - { + var endTemp = 0; + for (var i = 0; i <= text.length / rownum; i++) { endTemp = text.substr(beginInd, endInd).lastIndexOf(" "); - if(endTemp!=-1) - endInd=beginInd+endTemp; + if (endTemp != -1) + endInd = beginInd + endTemp; context.fillText(text.substr(beginInd, endInd), x, (i + 1) * 30); - beginInd = endInd+1; - if(beginInd>=text.length) + beginInd = endInd + 1; + if (beginInd >= text.length) break; endInd = beginInd + rownum; } @@ -1778,66 +1579,60 @@ //清除画布内容 CanvasRenderingContext2D.prototype.clear = - CanvasRenderingContext2D.prototype.clear || function (preserveTransform) { - if (preserveTransform) { - this.save(); - this.setTransform(1, 0, 0, 1, 0, 0); - } - - this.clearRect(0, 0, this.canvas.width, this.canvas.height); - - if (preserveTransform) { - this.restore(); - } + CanvasRenderingContext2D.prototype.clear || function (preserveTransform) { + if (preserveTransform) { + this.save(); + this.setTransform(1, 0, 0, 1, 0, 0); + } + + this.clearRect(0, 0, this.canvas.width, this.canvas.height); + + if (preserveTransform) { + this.restore(); + } }; - - /** - * 关闭页面前,如果正在进行验证,则先取消采集 - * @author wenxin - * @create 2013-06-24 19:57:11 pm - * @param browserFlag 浏览器标记 simple:简易版本,表示是ie浏览器;html5:表示支持html5的浏览器 - */ - function cancelCaptureBeforeClose(browserFlag) - { - //关闭页面时,监听关闭的onclick事件 - getCurrentWindow().button("close").attachEvent("onClick", function() - { - clearTimeout(verifyTimer); - if(browserFlag == "html5") - { - //正在进行验证,还没有关闭指纹采集 - if(verifyFlag) - { - //取消采集 - cancelCapture(); - } - //关闭页面 - closeWindow(); + +/** + * 关闭页面前,如果正在进行验证,则先取消采集 + * @author wenxin + * @create 2013-06-24 19:57:11 pm + * @param browserFlag 浏览器标记 simple:简易版本,表示是ie浏览器;html5:表示支持html5的浏览器 + */ +function cancelCaptureBeforeClose(browserFlag) { + //关闭页面时,监听关闭的onclick事件 + getCurrentWindow().button("close").attachEvent("onClick", function () { + clearTimeout(verifyTimer); + if (browserFlag == "html5") { + //正在进行验证,还没有关闭指纹采集 + if (verifyFlag) { + //取消采集 + cancelCapture(); } - else if(browserFlag == "simple") - { - //alert("cancel capture before close window!"); - //将定时器的递归调用关闭 - clearTimeout(timer); - //取消采集 - cancelRegister(); - //此处应该在取消结束后,再关闭窗口 - closeWindow(); - } - }); - } - - /** - * 表单提交 - * @author wenxin - * @create 2013-08-05 15:19:11 pm - */ - function formSubmit(id) - { - - $('#'+id).serialize(); - $('#'+id).ajaxForm(function(data){ - callBackFormSubmit(data); - }); - $('#'+id).submit(); //表单提交。 - } \ No newline at end of file + //关闭页面 + closeWindow(); + } + else if (browserFlag == "simple") { + //alert("cancel capture before close window!"); + //将定时器的递归调用关闭 + clearTimeout(timer); + //取消采集 + cancelRegister(); + //此处应该在取消结束后,再关闭窗口 + closeWindow(); + } + }); +} + +/** + * 表单提交 + * @author wenxin + * @create 2013-08-05 15:19:11 pm + */ +function formSubmit(id) { + + $('#' + id).serialize(); + $('#' + id).ajaxForm(function (data) { + callBackFormSubmit(data); + }); + $('#' + id).submit(); //表单提交。 +} \ No newline at end of file diff --git a/SunshineIns/src/copy/fingerprint/js/main.js b/SunshineIns/src/copy/fingerprint/js/main.js index ca7a9b7..6e18473 100644 --- a/SunshineIns/src/copy/fingerprint/js/main.js +++ b/SunshineIns/src/copy/fingerprint/js/main.js @@ -136,22 +136,23 @@ dataType: "json", async: true, success: function (result) { - debugger; //alert(objToStr(data)); //指纹采集次数 var collCount = 0; ret = result.ret; + console.log('ret', ret) if (ret == 0) { collCount = result.data.enroll_index; base64FPImg = result.data.jpg_base64; + //将定时器关闭 + clearTimeout(verifyTimer); } if (collCount == 0) { //定时器 timer = setTimeout("checkColl()", 200);//比对失败重新开始 } else { - //将定时器关闭 - clearTimeout(verifyTimer); + //显示指纹图像 showImage(globalContext, base64FPImg, "verification"); //存放国际化元素数组 @@ -163,7 +164,7 @@ getFPTemplate(paramArray, "verification"); $("#oneToMany").attr("disabled", false); $("#oneToOne").attr("disabled", false); - setTimeout("beginCapture(null)", 200); + // setTimeout("beginCapture(null)", 200); console.log('1', getFPTemplate(paramArray, "verification")) console.log('2', $("#oneToMany").attr("disabled", false)) @@ -342,7 +343,7 @@ //返回码 var ret = null; ret = result.ret; - console.log('template',result.data.template); + console.log('template', result.data.template); window.top.postMessage({ fingerCode: result.data.template, display: 'none' @@ -760,6 +761,7 @@ $("#bg").css("display", "none"); $("#box").css("display", "none"); $("#comparisonDiv").css("display", "none"); + } //初始化界面数据,即清除指纹记录。 diff --git "a/SunshineIns/src/copy/fingerprint/\346\214\207\347\272\271\346\257\224\345\257\271.html" "b/SunshineIns/src/copy/fingerprint/\346\214\207\347\272\271\346\257\224\345\257\271.html" deleted file mode 100644 index af1dc5d..0000000 --- "a/SunshineIns/src/copy/fingerprint/\346\214\207\347\272\271\346\257\224\345\257\271.html" +++ /dev/null @@ -1,72 +0,0 @@ -<!DOCTYPE html> -<html> -<head> -<title>指纹比对</title> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> -<link rel="stylesheet" href="css/box.css" type="text/css"> -<script type="text/javascript" src="js/main.js"></script> -<script type="text/javascript" src="js/fingerprint.js"></script> -<script type="text/javascript" src="js/jquery.js"></script> -<script type="text/javascript" src="js/baseMoth.js"></script> -<script type="text/javascript" src="js/dhtmlxCommon.js"></script> -</head> - -<body onload="myfunction()"> - <form method="post" id="fpVerifyForm" name="fpVerifyForm" - action="authLoginAction!login.do?fpLogin=fpLogin" - enctype="multipart/form-data" style="display: none"> - <input type="hidden" id="verifyModel" name="verifyModel" /> <input - type="hidden" id="verifyTemplate" name="verifyTemplate" /> - - </form> - - <div id="fpRegisterDiv" style="display: none; height: do"> - <a id="fpRegister" - onclick='submitRegister("指纹", "指纹数:", "确认保存当前修改吗?", "驱动下载", false)' - title="请安装指纹驱动或启动该服务" class="showGray" - onmouseover="this.className='showGray'">注册</a> - </div> - <div id="driverDownload" style="display: inline; margin: 0 0 0 5px;"> - <a id='downloadDriver' href='middleware/zkbioonline.exe' - title='驱动下载'>驱动下载</a> - </div> - <div id="comparison" style="display: inline" - onclick='fpVerification("指纹比对","请安装指纹驱动或启动服务",true,globalContext)'>比对</div> - <div> - <input type="button" onclick="doVerify()" value="测试1:1接口"/> - </div> - <div id="comparisonDiv" class="box" style="display: none"> - <h2>指纹比对</h2> - <div class="list"> - <canvas id="canvasComp" width="430" height="320" - style="background: url('image/base_fpVerify.jpg') rgb(243, 245, 240);"></canvas> - <input type="button" value="关闭" onclick='closeCompa()' /> - </div> - </div> - - <div id="bg" style="display: none;"></div> - <div id="box" class="box" style="display: none;"> - <h2>指纹登记</h2> - <div class="list"> - <canvas id="canvas" width="430" height="450" - style="background: rgb(243, 245, 240)"></canvas> - <input type="hidden" id="whetherModify" name="whetherModify" alt="" - value="111" /> - - <div - style="position: absolute; left: 310px; top: 325px; width: 70px; height: 28px;"> - <button type="button" id="submitButtonId" name="makeSureName" - onclick="submitEvent()" class="button-form">确定</button> - <!-- ${common_edit_ok}:确定 --> - </div> - <div - style="position: absolute; left: 310px; top: 365px; width: 70px; height: 28px;"> - <button class="button-form" type="button" id="closeButton" - name="closeButton" onclick='cancelEvent("确认保存当前修改吗?", "指纹数:");'> - 取消</button> - <!-- ${common_edit_cancel}:取消 --> - </div> - </div> - </div> -</body> -</html> \ No newline at end of file diff --git a/SunshineIns/src/data/menu.js b/SunshineIns/src/data/menu.js index cc2fbdc..02078f0 100644 --- a/SunshineIns/src/data/menu.js +++ b/SunshineIns/src/data/menu.js @@ -78,12 +78,21 @@ iconCheck: activeCheck, path: '/snapshot' }, { - id: 'criminalExecution', + id: 'criminal', name: '刑执监督管理', icon: infoManage, iconCheck: infoCheck, - path: '/criminalExecution' -},{ + children: [{ + id: 'criminalExecution', + name: '指纹登记', + path: '/criminalExecution' + }, { + id: 'criminalExecutionManager', + name: '指纹比对', + path: '/criminalExecutionManager' + }] +}, +{ id: 'crimeCrackdown', name: '扫黑除恶', icon: active, diff --git a/SunshineIns/src/fetch/_fetch.js b/SunshineIns/src/fetch/_fetch.js index 0e6baaf..724409b 100644 --- a/SunshineIns/src/fetch/_fetch.js +++ b/SunshineIns/src/fetch/_fetch.js @@ -3,6 +3,7 @@ // export const base = 'http://xnwj.gznsjc.gov.cn'; // export const base = 'http://nsjc.vaiwan.com'; export const base = 'http://120.79.193.119:9021/'; +// export const base = 'http://192.168.0.104:6060/'; // export const base = 'http://localhost:6060'; export const domain = base + '/nsjc-charge/'; diff --git a/SunshineIns/src/fetch/criminalCompare.js b/SunshineIns/src/fetch/criminalCompare.js new file mode 100644 index 0000000..4e146c0 --- /dev/null +++ b/SunshineIns/src/fetch/criminalCompare.js @@ -0,0 +1,9 @@ +import fetch from './_fetch'; +import { message } from 'antd'; +export default () => fetch(`api/criminal/compare`) + .then( + json => json + ) + .catch( + error => message.error('删除失败,请联系管理员', 2) + ); diff --git a/SunshineIns/src/fetch/criminalDelete.js b/SunshineIns/src/fetch/criminalDelete.js new file mode 100644 index 0000000..d3d10ae --- /dev/null +++ b/SunshineIns/src/fetch/criminalDelete.js @@ -0,0 +1,9 @@ +import fetch from './_fetch'; +import { message } from 'antd'; +export default (id) => fetch(`api/criminal/delete/${id}`) + .then( + json => json + ) + .catch( + error => message.error('删除失败,请联系管理员', 2) + ); diff --git a/SunshineIns/src/fetch/criminalFind.js b/SunshineIns/src/fetch/criminalFind.js new file mode 100644 index 0000000..918f7e1 --- /dev/null +++ b/SunshineIns/src/fetch/criminalFind.js @@ -0,0 +1,6 @@ +import fetch from './_fetch'; +import { message } from 'antd'; +export default (id) => fetch(`api/criminal/find/${id}`) + .catch( + error => message.error('详情加载失败,请联系管理员', 2) + ); diff --git a/SunshineIns/src/fetch/criminalQuery.js b/SunshineIns/src/fetch/criminalQuery.js new file mode 100644 index 0000000..09283a5 --- /dev/null +++ b/SunshineIns/src/fetch/criminalQuery.js @@ -0,0 +1,9 @@ +import fetch from './_fetch'; +import { message } from 'antd'; +export default ({ page, size }) => fetch(`api/criminal/query?size=${size}&page=${page}`) + .then( + json => json + ) + .catch( + error => message.error('详情加载失败,请联系管理员', 2) + ); diff --git a/SunshineIns/src/fetch/criminalSave.js b/SunshineIns/src/fetch/criminalSave.js new file mode 100644 index 0000000..7be04f8 --- /dev/null +++ b/SunshineIns/src/fetch/criminalSave.js @@ -0,0 +1,7 @@ + +import fetch from './_fetch'; +export default (savedate) => { + return fetch(`api/criminal/save`, + savedate + ); +} \ No newline at end of file diff --git a/SunshineIns/src/fetch/index.js b/SunshineIns/src/fetch/index.js index 9bee884..88c562c 100644 --- a/SunshineIns/src/fetch/index.js +++ b/SunshineIns/src/fetch/index.js @@ -103,6 +103,11 @@ import getAnswer from './getAnswer'; import entryDelete from './entryDelete'; import findImage from './findImage'; +import criminalFind from './criminalFind'; +import criminalSave from './criminalSave'; +import criminalQuery from './criminalQuery'; +import criminalDelete from './criminalDelete'; +import criminalCompare from './criminalCompare'; export default { domain, @@ -210,4 +215,9 @@ getAnswer, entryDelete, findImage, + criminalFind, + criminalSave, + criminalQuery, + criminalDelete, + criminalCompare }; \ No newline at end of file diff --git a/SunshineIns/src/index.jsx b/SunshineIns/src/index.jsx index 0365b5c..c229ffc 100644 --- a/SunshineIns/src/index.jsx +++ b/SunshineIns/src/index.jsx @@ -53,6 +53,7 @@ import TopImage from './page/TopImage'; // 刑执监督管理 import CriminalExecution from './page/CriminalExecution'; +import CriminalExecutionManager from './page/CriminalExecutionManager'; import NoInspectionReportList from './page/NoInspectionReportList'; @@ -124,8 +125,10 @@ {/* 刑执监督管理 */} <Route path='/criminalExecution' component={CriminalExecution} /> - - + {/* 刑执督 */} + <Route path='/criminalExecutionManager' component={CriminalExecutionManager} /> + + {/* 问卷管理部分 */} <Route path='/questionnaire/newlyList' component={NewlyList} /> <Route path='/questionnaire/newly/:id' component={Newly} /> @@ -133,7 +136,6 @@ <Route path='/questionnaire/detail/:id' component={QuestionDetail} /> {/* 小程序提交的任务详情 */} <Route path='/questionnaire/persondetail/:id/:userId' component={QuestionPersonDetail} /> - {/* 公安审核 */} <Route path='/entry/policeSecurity' component={PoliceSecurity} /> diff --git a/SunshineIns/src/page/CareList.jsx b/SunshineIns/src/page/CareList.jsx index 4cb2b8d..797843c 100644 --- a/SunshineIns/src/page/CareList.jsx +++ b/SunshineIns/src/page/CareList.jsx @@ -142,13 +142,13 @@ }, this.getData); } - reboot = (e,status) => { + reboot = (e, status) => { this.setState({ loading: true }) Fetch.socialUpdate(e, status).then(res => { if (res.code == 0) { console.log(res) this.setState({ loading: false }) - message.success(status==0?'重启任务成功':'暂停任务成功'); + message.success(status == 0 ? '重启任务成功' : '暂停任务成功'); this.getData(); } else { this.setState({ loading: false }) @@ -215,7 +215,7 @@ { record.status == 0 ? <React.Fragment> - <a onClick={() => this.showModal(record.id)}>编辑</a> + <a onClick={() => this.showModal(record.id)}>查看</a> <Divider type="vertical" /> <Popconfirm title="确认删除任务吗?" @@ -229,19 +229,11 @@ </Popconfirm> <a onClick={() => this.reboot(record.id, 99)}>暂停</a> </React.Fragment> : - record.status == 1 ? - <React.Fragment> - <a onClick={() => this.showModal(record.id)}>查看</a> - <Divider type="vertical" /> - <a onClick={() => this.showModal(record.id)}>结束任务</a> - <Divider type="vertical" /> - <a onClick={() => this.reboot(record.id, 99)}>暂停</a> - </React.Fragment> : - <React.Fragment> - <a onClick={() => this.showModal(record.id)}>查看</a> - <Divider type="vertical" /> - <a onClick={() => this.reboot(record.id, 0)}>重启</a> - </React.Fragment> + <React.Fragment> + <a onClick={() => this.showModal(record.id)}>查看</a> + <Divider type="vertical" /> + <a onClick={() => this.reboot(record.id, 0)}>重启</a> + </React.Fragment> } </span> ), diff --git a/SunshineIns/src/page/CareListEdit.jsx b/SunshineIns/src/page/CareListEdit.jsx index b65e1b3..822f686 100644 --- a/SunshineIns/src/page/CareListEdit.jsx +++ b/SunshineIns/src/page/CareListEdit.jsx @@ -87,7 +87,7 @@ taskType: res.taskType || 1 }, taskType: res.taskType || 1, - disabled: res.status ? true : false, + disabled: res.status == 0 || res.status == 99 ? true : false, list: res.tasks || [], socialTaskObject: res.socialTaskObject ? { id: res.socialTaskObject.objectId, objectName: res.socialTaskObject.objectName, taskReport: res.socialTaskObject.taskReport } : {}, loading: false, @@ -225,18 +225,12 @@ }); } - handleOk = e => { - const { savedate } = this.state; - console.log(savedate); - - this.setState({ - visible: false, - }); - Fetch.socialUpdate(savedate.id, 2) + handleOk = (record) => { + Fetch.socialUpdate(record.id, 2) .then(res => { if (res.code === 0) { message.success("结束任务成功!"); - this.props.history.push("/careList") + this.getDetail() } else { message.error('保存失败,请联系管理员', 2) } @@ -425,7 +419,7 @@ }, editorState: BraftEditor.createEditorState(res.taskRequire), editorStatetaskProcess: BraftEditor.createEditorState(res.taskProcess), - modaldisabled: res.status ? true : false, + modaldisabled: true, loading: false, }); }) @@ -433,45 +427,6 @@ modalshowCancel = () => { this.setState({ modalshowVisible: false, fileList: [] }) - } - - handleOk = () => { - console.log('success') - this.setState({ confirmLoading: true }); - const { modalData } = this.state; - console.log(modalData) - - if (!modalData.taskAddress) { - return message.warning("任务地点不能为空"); - } - if (!modalData.taskTitle) { - return message.warning("任务标题不能为空"); - } - if (!modalData.taskRequire) { - message.warning("任务要求不能为空"); - return; - } - if (!modalData.taskProcess) { - message.warning("任务流程不能为空"); - return; - } - console.log(modalData) - //提交完成后关闭弹窗,刷新列表 - - // Fetch.addResult({ ...modalData }) - // .then(res => { - // console.log(res) - // if (res.code === 0) { - // this.setState({ - // confirmLoading: false, - // modal: false, - // closeKey: Date.now() - // }, this.getData); - // message.success("提交成功!") - // } else { - // message.error('保存失败,请联系管理员', 2) - // } - // }); } @@ -516,6 +471,15 @@ <Popconfirm placement="topRight" title={'你确定要删除该条记录吗'} onConfirm={() => { this.onDel(text, record) }} okText="确定" cancelText="取消"> <label className="theme-color">删除</label> </Popconfirm> + { + record.status == 1 && + <React.Fragment> + <Divider type="vertical" /> + <Popconfirm placement="topRight" title={'你确定要结束任务吗'} onConfirm={() => { this.handleOk(record) }} okText="确定" cancelText="取消"> + <a >结束任务</a> + </Popconfirm> + </React.Fragment> + } </span> ), } @@ -659,34 +623,19 @@ { - - savedate.status == 2 || savedate.status == 99 ? + disabled ? <div style={{ display: 'flex', justifyContent: 'center' }}> <Button style={{ marginLeft: '15px', width: '150px' }} onClick={this.cancle}>返回</Button> </div> : - savedate.status == 1 ? - <div style={{ display: 'flex', justifyContent: 'center' }}> - <Button style={{ marginRight: '15px', width: '150px' }} type="primary" onClick={this.showModal}>结束任务</Button> - <Button style={{ marginLeft: '15px', width: '150px' }} onClick={this.cancle}>返回</Button> - </div> : - <div style={{ display: 'flex', justifyContent: 'center' }}> - <Button loading={btlloading} style={{ marginRight: '15px', width: '150px' }} type="primary" onClick={this.submit}>提交</Button> - <Button style={{ marginLeft: '15px', width: '150px' }} onClick={this.cancle}>返回</Button> - </div> + <div style={{ display: 'flex', justifyContent: 'center' }}> + <Button loading={btlloading} style={{ marginRight: '15px', width: '150px' }} type="primary" onClick={this.submit}>提交</Button> + <Button style={{ marginLeft: '15px', width: '150px' }} onClick={this.cancle}>返回</Button> + </div> } </BusDetailView> - <Modal - title="结束任务" - visible={this.state.visible} - onOk={this.handleOk} - onCancel={this.handleCancelModel} - width='300px' - > - <p>确认结束任务吗?</p> - </Modal> <Modal width='60%' title="添加" @@ -753,12 +702,12 @@ </Row> </div> { - savedate.status == 1 || savedate.status == 2 ? + modalData.socialTaskObject && modalData.socialTaskObject.taskReport ? <div style={divStyle}> <Row type="flex" align='middle' justify="space-around"> <Col span={6} pull={0} style={{ textAlign: 'center' }}><span>任务汇报</span></Col> <Col span={18} push={0} > - <TextArea disabled={disabled} rows={8} value={socialTaskObject.taskReport || ""} onChange={this.saveModalInputChange} name='taskReport' /> + <TextArea disabled={disabled} rows={8} value={modalData.socialTaskObject.taskReport || ""} onChange={this.saveModalInputChange} name='taskReport' /> </Col> <Col span={12} pull={0}></Col> </Row> @@ -766,7 +715,7 @@ } { - savedate.status == 1 || savedate.status == 2 ? + modalData.socialTaskObject && modalData.socialTaskObject.taskReport ? <div style={divStyle}> <div style={divStyle}> <Row type="flex" align='top' justify="space-around"> diff --git a/SunshineIns/src/page/CriminalExecution.jsx b/SunshineIns/src/page/CriminalExecution.jsx index 222b641..2a4dced 100644 --- a/SunshineIns/src/page/CriminalExecution.jsx +++ b/SunshineIns/src/page/CriminalExecution.jsx @@ -3,62 +3,19 @@ import HeadView from '../view/HeadView'; import TableBtnView from '../view/TableBtnView'; import CommonSearchForm from '../view/CommonSearchForm'; -import { Input, Button, DatePicker, Divider, message, Popconfirm, Select, Badge, Modal, Row, Col } from 'antd'; +import { Input, Button, DatePicker, Divider, message, Popconfirm, Select, Tooltip, Modal, Row, Col } from 'antd'; import moment from 'moment'; import Fetch from '../fetch'; import TableView from '../view/TableView'; const Option = Select.Option; -function typeOfName(type) { - switch (type) { - case 1: - return "跟踪帮教"; - case 2: - return "合适成年人"; - case 3: - return "社会调查"; - case 4: - return "心理疏导"; - case 5: - return "法律援助"; - } -} - -const taskNodeIds = { - 1: '跟踪帮教', - 2: '合适成年人', - 3: '社会调查', - 4: '心理疏导', - 5: '法律援助', -} - -const activityTypeList = [ - 1, - 2, - 3, - 4, - 5 -] -const activityStatusIds = { - 0: '未开始', - 1: '进行中', - 2: '已结束', - 99: '暂停', -} - -const activityStatusList = [ - 0, - 1, - 2 -] - export default class CareList extends React.Component { constructor(props) { super(props); this.state = { - data: [], - formData: { + list: [], + formdata: { __key: Date.now(), page: 1, size: 10, @@ -73,7 +30,7 @@ } componentDidMount() { - document.title = '社会观护管理'; + document.title = '刑执监督管理'; let _this = this; window.addEventListener('message', function (e) { console.log('反馈', e) @@ -83,20 +40,35 @@ }) } }, false); - this.iframeAddEventListener(); + _this.iframeAddEventListener(); + _this.getData(); + } + + getData = () => { + const { formdata } = this.state; + this.setState({ loading: true }) + console.log('formdata', formdata) + Fetch.criminalQuery({ ...formdata }) + .then(res => { + console.log("res", res) + this.setState({ + list: res.data.content, + loading: false + }); + }); } setFormData = data => { console.log('form', data); this.setState({ - formData: data, + formdata: data, }); } deleteItems = (e) => { console.log(e); this.setState({ loading: true }) - Fetch.socialDelete(e).then(res => { + Fetch.criminalDelete(e).then(res => { if (res.code == 0) { console.log(res) this.setState({ loading: false }) @@ -115,13 +87,15 @@ visible: true, zIndex: 1000, iframeKey: id, - display: 'none' + display: 'none', + loading: true, }); this.sendMsg(); - // Fetch.socialCompanyDetail(id) - // .then(res => { - // this.setState({ savedate: res }) - // }) + Fetch.criminalFind(id) + .then(res => { + console.log(res) + this.setState({ savedate: res.data, fingerCode: res.data.fingerCode || '', loading: false }) + }) } saveInputChange = ({ target: { value, name } }) => { @@ -138,7 +112,7 @@ title: '编号', dataIndex: 'index', key: 'index', - render: (text, item, index) => <span>{index}</span> + render: (text, item, index) => <span>{index + 1}</span> }, { title: ' 姓名', dataIndex: 'name', @@ -149,8 +123,9 @@ key: 'number', }, { title: '指纹唯一识别', - dataIndex: 'shibie', - key: 'shibie', + dataIndex: 'fingerCode', + key: 'fingerCode', + render: text => <div className="nowrap">{text}</div> }, { title: '录入时间', dataIndex: 'createTime', @@ -163,7 +138,15 @@ <span> <label onClick={() => this.showModal(record.id)} className='theme-color' style={{ cursor: 'pointer' }}>编辑</label> <Divider type="vertical" /> - <label onClick={() => this.deleteItems(record.id)} className='theme-color' style={{ cursor: 'pointer' }}>删除</label> + <Popconfirm + title="确认删除吗?" + id={record.id} + onConfirm={e => this.deleteItems(record.id)} + okText="确定" + cancelText="取消" + > + <label className='theme-color' style={{ cursor: 'pointer' }}>删除</label> + </Popconfirm> </span> ), }] @@ -190,9 +173,31 @@ //确认提交按钮 handleOk = () => { + const { savedate, fingerCode } = this.state; + if (!savedate.name) { + return message.warning("姓名不能为空"); + } + if (!savedate.number) { + return message.warning("牢房号不能为空"); + } + if (!fingerCode) { + return message.warning("请录入指纹"); + } + this.setState({ btloading: true }) + Fetch.criminalSave({ ...savedate, fingerCode }) + .then(res => { + if (res.code === 0) { + this.setState({ + zIndex: '-1', + fingerCode: "", + btloading: false, + closeKey: Date.now() + }, this.getData); + message.success("提交成功!") + } + }); this.setState({ - zIndex: '-1', - fingerCode: "", + }) } @@ -205,7 +210,7 @@ } render() { - const { data, resetKey, visible, loading, savedate, closeKey, formData, zIndex, display, fingerCode, iframeKey } = this.state; + const { list, resetKey, visible, loading, btloading, savedate, closeKey, formdata, zIndex, display, fingerCode, iframeKey } = this.state; return ( <div className="app-page"> <HeadView history={this.props.history} /> @@ -213,9 +218,9 @@ <Button type="primary" size='large' onClick={() => this.showModal('new')}>新增</Button> </div> <div style={{ background: '#fff', margin: 20 }}> - <CommonSearchForm + {/* <CommonSearchForm {...this.props} - formData={formData} + formData={formdata} setFormData={this.setFormData} searchonClick={this.searchonClick} pathName={this.props.location.pathname} @@ -229,13 +234,13 @@ { type: 'input', name: '联系电话', label: '联系电话', key: 'companyTel' }, - ]} /> - <TableView columns={this.renderColumns()} data={data} pageSize='10' size='default' loading={loading} /> + ]} /> */} + <TableView columns={this.renderColumns()} data={list} pageSize='10' size='default' loading={loading} /> </div> <Modal zIndex={zIndex} key={closeKey} - confirmLoading={loading} + confirmLoading={btloading} visible={true} title="指纹录入" onOk={this.handleOk} @@ -246,8 +251,8 @@ bodyStyle={{ lineHeight: 4 }} > <Input addonBefore="姓名" name='name' onChange={this.saveInputChange} value={savedate.name || ''} /> - <Input addonBefore="牢房号" name='lnumber' onChange={this.saveInputChange} value={savedate.lnumber || ''} /> - <Input addonBefore="指纹唯一标识" name='fingerCode' onChange={this.saveInputChange} value={fingerCode || ''} addonAfter={<Row type="flex" style={{ flexWrap: 'nowrap' }}> + <Input addonBefore="牢房号" name='number' onChange={this.saveInputChange} value={savedate.number || ''} /> + <Input addonBefore="指纹唯一标识" name='fingerCode' value={fingerCode || ''} disabled addonAfter={<Row type="flex" style={{ flexWrap: 'nowrap' }}> <Col style={{ cursor: 'pointer' }} onClick={() => this.setState({ display: 'block' })}> 录入指纹 </Col> @@ -259,7 +264,7 @@ style={{ width: '100%', height: '550px' }} onLoad={() => { }} ref="iframe" - src='./fingerprint/指纹登记.html' + src='./fingerprint/dengji.html' width="100%" scrolling="no" frameBorder="0" diff --git a/SunshineIns/src/page/CriminalExecutionManager.jsx b/SunshineIns/src/page/CriminalExecutionManager.jsx new file mode 100644 index 0000000..a04ee2a --- /dev/null +++ b/SunshineIns/src/page/CriminalExecutionManager.jsx @@ -0,0 +1,93 @@ +import React from 'react'; + +import HeadView from '../view/HeadView'; +import TableBtnView from '../view/TableBtnView'; +import CommonSearchForm from '../view/CommonSearchForm'; +import { Input, Button, DatePicker, Divider, message, Popconfirm, Select, Tooltip, Modal, Row, Col } from 'antd'; +import moment from 'moment'; +import bg_ns from '../asset/image/bg_ns.jpg'; +import Fetch from '../fetch'; +import TableView from '../view/TableView'; + +const Option = Select.Option; + +export default class CriminalExecutionManager extends React.Component { + constructor(props) { + super(props); + this.state = { + list: [], + formdata: { + __key: Date.now(), + page: 1, + size: 10, + }, + resetKey: Date.now(), + loading: false, + zIndex: '-1', + savedate: {}, + display: 'block', + fingerCode: '' + }; + } + + componentDidMount() { + document.title = '指纹对比'; + let _this = this; + window.addEventListener('message', function (e) { + console.log('反馈', e) + console.log(e.data.submitstatus) + console.log(_this.state.fingerCode) + if (e.data.submitstatus && _this.state.fingerCode) { + Fetch.criminalCompare() + .then(res => { + console.log("res", res) + }); + } + if (e.data) { + _this.setState({ + ...e.data + }) + } + }, false); + _this.iframeAddEventListener(); + } + + + iframeAddEventListener = () => { + let _this = this; + this.iframeWin = this.refs.iframe && this.refs.iframe.contentWindow; + this.refs.iframe && this.refs.iframe.addEventListener("load", function () { + //代码能执行到这里说明已经载入成功完毕了 + //这里是回调函数 + _this.iframeWin.postMessage({ + fgData: true + }, '*'); + }, false); + } + + render() { + const { iframeKey } = this.state; + return ( + <div className="app-page"> + <HeadView history={this.props.history} /> + <div style={{ background: '#13A3DE', color: '#fff', height: '20vh', fontSize: '32px', textAlign: 'center', lineHeight: '20vh' }}>欢迎使用广州南沙检院刑事执行监督收集平台</div> + <div style={{ display: "flex" }}> + <div style={{ width: "500px", flex: "3", margin: '24px' }}><img src={bg_ns} style={{ width: "100%" }} /></div> + <div style={{ flex: '2', margin: '24px' }}> + <iframe + key={iframeKey} + style={{ width: '100%', height: '550px' }} + onLoad={() => { }} + ref="iframe" + src='./fingerprint/bidui.html' + width="100%" + scrolling="no" + frameBorder="0" + /> + </div> + </div> + + </div> + ) + } +} \ No newline at end of file diff --git a/SunshineIns/src/page/UnderAgeList.jsx b/SunshineIns/src/page/UnderAgeList.jsx index 83bd989..4684b10 100644 --- a/SunshineIns/src/page/UnderAgeList.jsx +++ b/SunshineIns/src/page/UnderAgeList.jsx @@ -111,7 +111,7 @@ }); Fetch.socialCompanyDetail(id) .then(res => { - this.setState({ savedate: res }) + this.setState({ savedate: res, fingerCode: res.fingerCode }) }) } @@ -131,7 +131,7 @@ }); return message.warning("电话号码格式不正确"); } - }else{ + } else { this.setState({ loading: false }); diff --git a/SunshineLnsMinApp/pages/index/index.js b/SunshineLnsMinApp/pages/index/index.js index f0a0e2e..fef8357 100644 --- a/SunshineLnsMinApp/pages/index/index.js +++ b/SunshineLnsMinApp/pages/index/index.js @@ -39,7 +39,7 @@ }, { name: '检务公开' }, { - name: '智能咨询' + name: '知识产权' }], }, //事件处理函数 diff --git a/SunshineLnsMinApp/pages/index/index.wxml b/SunshineLnsMinApp/pages/index/index.wxml index 76f84af..a893466 100644 --- a/SunshineLnsMinApp/pages/index/index.wxml +++ b/SunshineLnsMinApp/pages/index/index.wxml @@ -306,7 +306,7 @@ <view class='VerticalNav-flex-t'> <view class="bg-img" data-str="lawInfo" data-id="9" bindtap='clinkFunction' style="background-image: url('https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1577104674828&di=1ad5819ce06281fb5090a4038980917e&imgtype=0&src=http%3A%2F%2Fimage.sike.news.cn%2Fuploads%2F2019%2F05%2F2019-05-2451.jpg');margin: 6px;height: 78px;flex: 1; line-height: 78px;"> <view class="bg-shadeTop"> - 知识产权 + 智能咨询 </view> </view> <view class="bg-img" style="margin: 6px;height: 78px;flex: 1; line-height: 78px;"> -- Gitblit v1.8.0