Browse Source

Z991239-1812 #comment 错误页添加多个参数控制

陈良瑜80374463 4 years ago
parent
commit
7aabc3d4e6

+ 32 - 1
addin/res/ManagerDesktop/css/ininPsd.css

@@ -254,7 +254,10 @@ nav ul li:nth-child(4)::before{
 	background: url('../images/off.png');
 	background-size: cover;
 }
-
+nav ul li:nth-child(5)::before{
+	background: url('../images/min.png');
+	background-size: cover;
+}
 .imgDiv{
 	text-align: center;
 	margin-bottom: 30px;
@@ -319,4 +322,32 @@ nav ul li:nth-child(4)::before{
 	position: fixed;
 	top: 100px;
 	left: 27%;
+}
+
+.exitTips{
+	display: none;
+}
+.exitTips .box{
+	width: 30%;
+	height: 150px;
+	line-height: 150px;
+	border-radius: 6px;
+	font-size: 18px;
+	background-color: #f4f4f4;
+	z-index: 9999;
+	position: absolute;
+	left: 35%;
+	top: 50%;
+	transform: translateY(-150px);
+	text-align: center;
+}
+
+.terminal-time{
+	display: flex;
+	justify-content: center;
+	margin-bottom: 20px;
+}
+
+#ErrTime{
+	margin-left: 25px;
 }

+ 16 - 1
addin/res/ManagerDesktop/errPage.html

@@ -26,10 +26,12 @@
 				<img width="100%" src="./images/logo_cmb.png" />
 			</div>
 			<ul>
-				<li class="fz_24" onclick="resetRSA()">	重置密钥 </li>
+				<li class="fz_24" id="resetPsd" onclick="resetRSA()">	重置密钥 </li>
 				<li class="fz_24" onclick="RebootShell()">	重启应用 </li>
 				<li class="fz_24" onclick="RebootComputer()">	重启计算机 </li>
 				<li class="fz_24" onclick="PowerOff()">	关机 </li>
+				<li class="fz_24" onclick="PowerOff()">	最小化 </li>
+
 			</ul>
 		</nav>
 
@@ -37,6 +39,12 @@
 		<div class="imgDiv">
 			<img id="AuthFailBg" src="./images/close.png" />
 		</div>
+		<div class="terminal-time">
+			<span class="fz_32" id="TerminalNo"></span>
+			<span class="fz_32" id="ErrTime"></span>
+		</div>
+
+
 		<p class="fz_32" id="SuspensionTxt"></p>
 		<p class="fz_32" id="PromptTxt"></p>
 
@@ -126,5 +134,12 @@
 			<!-- loading -->
 			</div>
 			</div>
+
+		<div class="exitTips">
+			<div class="coverBg"></div>
+			<div class="box">
+				应用将在<span id="exitColck"></span>s之后退出
+			</div>
+		</div>
 	</body>
 </html>

BIN
addin/res/ManagerDesktop/images/min.png


+ 44 - 6
addin/res/ManagerDesktop/js/errPage.js

@@ -7,6 +7,7 @@ window.onload=function(){
 				return false;
 			}
 		}
+
   }
 
   WebSocketBase.socket.onerror = function () {
@@ -30,16 +31,33 @@ function showErrTips(){
   reason = Request['reason'];
   let urlParams = decodeURI(decodeURI(location.search))
   let urlParamsArr = urlParams.split('?')[1].split('&')
+  
   for(let item of urlParamsArr){
     Request[item.split('=')[0]] = item.split('=')[1]
   }
   let SuspensionTxt,PromptTxt
+  var usercode = Request['usercode'];
+  if(usercode){
+    $('#AuthFailBg').attr('src', `../images/${usercode}.png`)
+  }
+  if(Request['TerminalNo']){
+    document.getElementById("TerminalNo").innerHTML = 'TerminalNo: '+Request['TerminalNo']
+  }
+  if(Request['ErrTime']){
+    document.getElementById("ErrTime").innerHTML = 'ErrTime: '+Request['ErrTime']
+  }
 
+  if(Request['ShowLimit']){
+    $("#resetPsd").css({'display':'none'})
+  }
+  
+  
   switch(reason)
   {
     case "breakdown" :
       var errmsg = Request['errmsg'];
       var clock =Request['reboottime'];
+      
       document.getElementById("RestartTxt").innerHTML = "可视柜台将在" + clock + "重启";
       SuspensionTxt = "准入不通过暂停服务:"+errmsg;
       PromptTxt = "请联系分行信息技术部处理故障";
@@ -68,7 +86,6 @@ function showErrTips(){
       PromptTxt = "系统配置中,请稍候";
       break;
     case "WEB_OPEN_FAIL":
-      console.log('Request----',Request)
       var errmsg = Request['errmsg'];
       var errcode =Request['errcode'];
       SuspensionTxt = errmsg;
@@ -103,11 +120,11 @@ function GetRequest() {
   return theRequest;
 } 
 
-  //重置密钥
-  function resetRSA(){
-    ReadCenterConfig('centerSetting')
-    $('.iframeDiv').fadeIn();
-  }
+//重置密钥
+function resetRSA(){
+  ReadCenterConfig('centerSetting')
+  $('.iframeDiv').fadeIn();
+}
 
 
 
@@ -142,6 +159,7 @@ function ModalStyleErr(tips){
 // modal 确定事件
 function clickSure(){
   if(!btnType)return false;
+  exitTipsColck()
   switch(btnType)
   {
     case 'RebootShell': DeviceService.RebootShell(); break;
@@ -151,6 +169,26 @@ function clickSure(){
   $('#modalBoxErr').fadeOut('slow')
 }
 
+function exitTipsColck(){
+  $('.exitTips').css({'display':'block'})
+  let clock = 20
+  $("#exitColck").html(clock);
+  let timer = setInterval(()=>{
+    clock--
+    $("#exitColck").html(clock);
+    if(clock==0){
+      let req = {};
+      req.messageType = 0;
+      req.command = 'ChromiumClose';
+      sendRequest(req); 
+      clearInterval(timer)
+      $('.exitTips').css({'display':'none'})
+
+    }
+  },1000)
+  
+}
+
 function closeModalErr(){
   $('#modalBoxErr').fadeOut('slow')
 }

+ 1 - 1
addin/res/ManagerDesktop/js/initPsd.js

@@ -104,7 +104,7 @@ function downLoad(){
 		if(ret){
 			$('#loadContent').fadeOut('slow')
 			if(ret.errorCode !==0){
-				let tips = `[${ret.errorCode}]`+ ret.errorMsg
+				let tips = (ret.errorCode == undefined) ? `[${ret.Errcode.toString(16)}]`+ ret.ErrMsg : `[${ret.errorCode}]`+ ret.errorMsg 
 				ModalStyle(tips,'pathN');
 				return false
 			}