浏览代码

Z991239-4982 #comment feata: 合并用户桌面扫码优化的页面

陈纪林80310970 1 年之前
父节点
当前提交
c0717af03b

+ 45 - 8
addin/res/ManagerDesktop/css/errType.css

@@ -76,6 +76,26 @@ input[type="number"]{
 	top: 0;
 	left: 0;
 }
+.prompt-btns{
+	width: 100%;
+	display: flex;
+	justify-content: space-evenly;
+	flex-wrap: wrap;
+}
+.hardwareConfig{
+	display: none;
+}
+.prompt-btns .btn-gray{
+	color: #333;
+	height: 43px!important;
+}
+.prompt-btns p{
+	width: 100%;
+	text-align: center;
+	color: #db920b;
+	padding-top: 10px;
+}
+
 .coverBg {
 	width: 100%;
 	height: 100%;
@@ -106,12 +126,14 @@ input[type="number"]{
 	overflow: auto;
 	/* padding: 0 30px; */
 }
-.modal button {
+.modal button,
+.modal a {
 	width: 200px;
 	height: 45px;
 	line-height: 45px;
 	border-radius: 20px;
 	margin-top: 30px;
+	text-align: center;
 }
 .modal .btns {
 	display: flex;
@@ -120,6 +142,7 @@ input[type="number"]{
 	margin-top: 30px;
 }
 .modal .btn-blues{
+	color: #fff;
 	background-image: linear-gradient(to bottom right, #4D7BFE, #749FFF);
 }
 .modal .btn-gray{
@@ -237,6 +260,7 @@ input[type="number"]{
     align-items: center;
     justify-content: center;
 }
+
 .btn_confirm{
 	width: 300px;
 	height: 80px;
@@ -560,27 +584,34 @@ dot::before {
 	line-height: 20px;
 	position: absolute;
 	left: 0;
-	bottom: 0;
 	color: #ccc;
 	content: '●';
 	font-size: 16px;
 	white-space: pre-wrap;   /* 也可以是white-space: pre */
 }
 .dot::before {
-	animation: dotMin 4s infinite step-start both;
+	bottom: 0;
+	animation: dotWin 4s infinite step-start both;
 }
-.test-dot{
-	/* color: #888; */
+.dot-uos::before {
+	bottom: 2px;
+	animation: dotUOS 4s infinite step-start both;
 }
+
 .test-dot::before{
+	bottom: 0;
 	animation: testDot 2.4s infinite step-start both;
 }
+.test-dot-uos::before{
+	bottom: 2px;
+	animation: testDotUOS 2.4s infinite step-start both;
+}
+
 .paused::before{
 	animation-play-state: paused;
 }
 
-
-@keyframes dot {
+@keyframes dotUOS {
 	16% { transform:translateX(0px); }
 	32% { transform: translateX(16px); }
 	48% { transform: translateX(32px); }
@@ -589,7 +620,7 @@ dot::before {
 	100% { transform: translateX(80px); }
 }
 
-@keyframes dotMin {
+@keyframes dotWin {
 	16% { transform:translateX(0px); }
 	32% { transform: translateX(10px); }
 	48% { transform: translateX(20px); }
@@ -603,6 +634,12 @@ dot::before {
 	66% { transform: translateX(10px); }
 	100% { transform: translateX(20px); }
 }
+
+@keyframes testDotUOS {
+	33% { transform:translateX(0px); }
+	66% { transform: translateX(16px); }
+	100% { transform: translateX(32px); }
+}
 /******************************** loading 点点动画 **************************/
 
 @media screen and (max-width:1300px) {

+ 5 - 1
addin/res/ManagerDesktop/entityCheck.html

@@ -128,7 +128,11 @@
 			<div class="modal" id="modal">
 				<img src="./images/success.png" />
 				<p class="fz_24" id="errTips"></p>
-				<button class="fz_23 btn-blues" onclick="closeModal('prompt')">确定</button>
+				<div class="prompt-btns">
+					<button class="fz_23 btn-gray hardwareConfig" onclick="hardwareConfig()">硬件配置</button>
+					<button class="fz_23 btn-blues" onclick="closeModal('prompt')">确定</button>
+					<p class="hardwareConfig">请确认密码键盘配置是否正确,如需修改请使用硬件配置</p>
+				</div>
 			</div>
 		</div>
 		<!-- 提示框 -->

+ 5 - 1
addin/res/ManagerDesktop/homePageErr.html

@@ -128,7 +128,11 @@
 			<div class="modal" id="modal">
 				<img src="./images/success.png" />
 				<p class="fz_24" id="errTips"></p>
-				<button class="fz_23 btn-blues" onclick="closeModal('prompt')">确定</button>
+				<div class="prompt-btns">
+					<button class="fz_23 btn-gray hardwareConfig" onclick="hardwareConfig()">硬件配置</button>
+					<button class="fz_23 btn-blues" onclick="closeModal('prompt')">确定</button>
+					<p class="hardwareConfig">请确认密码键盘配置是否正确,如需修改请使用硬件配置</p>
+				</div>
 			</div>
 		</div>
 		<!-- 提示框 -->

+ 7 - 4
addin/res/ManagerDesktop/js/entityCheck.js

@@ -221,14 +221,12 @@ function getBizLinkDetect(url,urlTitle,idx){
 		}
 	})
 }
-
 // 网卡连接-删除后,检测按钮异常,临时方案
 function getNetCardLink(){
   testResult[1] = 'Y'
   set_testResult(testResult,goBusiHome)
 }
-
-// 网卡连接
+// // 网卡连接
 // function getNetCardLink(){
 //   let date = +new Date
 //   let dateTime = getFamtterTimer(date)
@@ -288,8 +286,13 @@ function retestFn(){
 
   $('.entity-item').fadeOut();
   $('#retestBtn').attr('disabled',true)
-  document.getElementById('retestBtn').innerHTML = '检测中<dot class="test-dot">●●●</dot>'
   $('.icon-type').removeClass('icon-err icon-suc')
+  // UOS WIN loading加载点点存在2px的差异,需特殊处理
+  if(navigator.userAgent.toLowerCase().indexOf('windows')<0){
+    document.getElementById('retestBtn').innerHTML = '检测中<dot class="test-dot-uos">●●●</dot>'
+  }else{
+    document.getElementById('retestBtn').innerHTML = '检测中<dot class="test-dot">●●●</dot>'
+  }
 
   getBizLinks();
 

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

@@ -471,7 +471,7 @@ var AccessAuthService = {
     },
     _methodID : {
         InitializeNew: 4,
-        GetNetMsg: 6,
+        GetNetMsg: 6
     },
             
     _methodSignature :{

+ 4 - 2
addin/res/ManagerDesktop/js/errPage.js

@@ -10,13 +10,15 @@ window.onload=function(){
   }
   
   WebSocketBase.socket.onerror = function () {
-		logEvent("DeviceControlService startSession callback");
+		logEvent("HealthManagerService startSession callback");
     let tips = "终端链接失败"
     ModalStyle(tips, 'pathN')
   }
 
+  HealthManagerService.init();
   showErrTips();
   getHardwareInfo()
+
 }
 
 
@@ -161,7 +163,7 @@ function getHardwareInfo(){
 		showToast(tips);
 	},5000)
 
-	DeviceControlService.QueryHardwareInfo(req, function(res) {
+	HealthManagerService.QueryHardwareInfo(req, function(res) {
 		logEvent("QueryHardwareInfo ret: "+JSON.stringify(res));
 		if(res){
 			clearTimeout(timeoutFn);

+ 54 - 20
addin/res/ManagerDesktop/js/getTerminalInfo.js

@@ -10,7 +10,7 @@ window.onload=function(){
   }
   
   WebSocketBase.socket.onerror = function () {
-		logEvent("DeviceControlService startSession callback");
+		logEvent("HealthManagerService startSession callback");
     let tips = "终端链接失败"
     ModalPrompt(tips, 'pathN')
   }
@@ -39,9 +39,19 @@ window.onload=function(){
   getHardwareInfo()
   // getAccessUrl()
 	getCertainAceessUrl() //准入接口
+	ReadCenterScanConfig() //读取扫码配置
 
 	$('#loadContent').fadeIn('slow');
+	$('.hardwareConfig').fadeOut() //页面开始加载的时候,强制隐藏一下硬件配置按钮
 
+  // dot 类名加载,loading点点在UOS需重新处理
+  if(navigator.userAgent.toLowerCase().indexOf('windows')<0){
+		$('#retestBtn dot').removeClass('test-dot')
+		$('#retestBtn dot').addClass('test-dot-uos')
+		$('#restDot dot').removeClass('dot')
+		$('#restDot dot').addClass('dot-uos')
+  }
+	
 }
 
 
@@ -50,6 +60,7 @@ window.onload=function(){
  * @param {} 
  * @return: terminalNo,termVersion
  */
+let terminalNo,hardwareConfigURI=''
 function getHardwareInfo(){
   let req = new Request()
 	let timeoutFn= setTimeout(function(){
@@ -66,26 +77,42 @@ function getHardwareInfo(){
 			$('.terminalNo').html(res.terminalNo)
 			$('.termVersion').html('V'+res.termVersion)
 			$('#loadContent').fadeOut('slow');
-
+			terminalNo = res.terminalNo;
 			let clientId ='';
       switch(res.reserved1){ 
-        case 0: clientId = '6898ec10629f499187d7b31fbe9823a4'; break; //DEV
-        case 1: clientId = '6898ec10629f499187d7b31fbe9823a4'; break; //ST
-        case 2: clientId = '6898ec10629f499187d7b31fbe9823a4'; break; //UAT
-        case 3: clientId = '9e7e54105fce408cae37322dbbd64046'; break; //PRD
-        default: clientId = '9e7e54105fce408cae37322dbbd64046'; break; //PRD
+        case 0: 
+				clientId = '6898ec10629f499187d7b31fbe9823a4';
+				hardwareConfigURI='https://firmregisterfront.paas.cmbchina.cn';
+				break; //DEV
+        case 1: 
+					clientId = '6898ec10629f499187d7b31fbe9823a4'; 
+					hardwareConfigURI='https://firmregisterfront.paasst.cmbchina.cn';
+				break; //ST
+        case 2: 
+					clientId = '6898ec10629f499187d7b31fbe9823a4';
+					hardwareConfigURI='firmregisterfront.paasuat.cmbchina.cn';
+				break; //UAT
+        case 3: 
+				clientId = '9e7e54105fce408cae37322dbbd64046'; 
+				hardwareConfigURI='firmregisterfront.paas.cmbchina.cn';
+				break; //PRD
+        default: 
+					clientId = '9e7e54105fce408cae37322dbbd64046';
+					hardwareConfigURI='firmregisterfront.paas.cmbchina.cn';
+				break; //PRD
       }
+			//todo
 			if(document.getElementById('iframeSrc')){
 				let iframeSrc = 'https://one-account-gateway.paasuat.cmbchina.cn/auth-plugin/v2/identity-authentication?clientId='+clientId+'&ui=eyJhdXRoVHlwZXMiOlsicXJDb2RlIl0sImhlYWRlciI6dHJ1ZX0%253D'
 				//Pad  https://oa-auth.paas.cmbchina.com/auth-plugin/v2/identity-authentication
 				//大机 https://oa-auth.paas.cmbchina.cn/auth-plugin/v2/identity-authentication
-				if(res.reserved1==3){
-					if(res.machineType.toUpperCase()=='RVC.PAD'){
-						iframeSrc = 'https://oa-auth.paas.cmbchina.com/auth-plugin/v2/identity-authentication?clientId='+clientId+'&ui=eyJhdXRoVHlwZXMiOlsicXJDb2RlIl0sImhlYWRlciI6dHJ1ZX0%253D'
-					}else{
-						iframeSrc = 'https://oa-auth.paas.cmbchina.cn/auth-plugin/v2/identity-authentication?clientId='+clientId+'&ui=eyJhdXRoVHlwZXMiOlsicXJDb2RlIl0sImhlYWRlciI6dHJ1ZX0%253D'
-					}
-				}
+				// if(res.reserved1==3){
+				// 	if(res.machineType.toUpperCase()=='RVC.PAD'){
+				// 		iframeSrc = 'https://oa-auth.paas.cmbchina.com/auth-plugin/v2/identity-authentication?clientId='+clientId+'&ui=eyJhdXRoVHlwZXMiOlsicXJDb2RlIl0sImhlYWRlciI6dHJ1ZX0%253D'
+				// 	}else{
+				// 		iframeSrc = 'https://oa-auth.paas.cmbchina.cn/auth-plugin/v2/identity-authentication?clientId='+clientId+'&ui=eyJhdXRoVHlwZXMiOlsicXJDb2RlIl0sImhlYWRlciI6dHJ1ZX0%253D'
+				// 	}
+				// }
 				
 				document.getElementById('iframeSrc').src = iframeSrc
 			}
@@ -94,6 +121,10 @@ function getHardwareInfo(){
 	})
 }
 
+function hardwareConfig(){ //todo
+	window.location.href =`${hardwareConfigURI}/hardwareConfig?terminalNo=${terminalNo}&loginWay=3&url=xx#/`
+}
+
 
 /**
  * @description: 查询初始化地址
@@ -113,7 +144,7 @@ function getAccessUrl(){
 		console.log("GetAccessUrl ret: "+JSON.stringify(ret));
 		if(ret){
 			clearTimeout(timeoutFn);
-			// HostUrl = ret.HostUrl
+			HostUrl = ret.HostUrl
 			// $('.urlAccessAddr').html(ret.HostUrl)
 		}
 		
@@ -202,11 +233,14 @@ function closeModal(type){
 
 // 关闭错误页
 function chromiumClose(){
-		// let req = {};
-		// req.messageType = 0;
-		// req.command = 'ChromiumClose';
-		// sendRequest(req); 
-		open(location, '_self').close()
+	if(navigator.userAgent.toLowerCase().indexOf('windows')<0){
+		open(location, '_self').close() //UOS退出关闭页
+	}else{
+		let req = {};
+		req.messageType = 0;
+		req.command = 'ChromiumClose';
+		sendRequest(req); 
+	}
 }
 
 function sendRequest(request){

+ 5 - 4
addin/res/ManagerDesktop/js/initPsd.js

@@ -8,12 +8,13 @@ window.onload=function(){
 			}
 		}
 	}
-	DeviceControlService.init();
+	
 	CenterSettingService.init();
 	AccessAuthService.init();
+	HealthManagerService.init();
 
 	WebSocketBase.socket.onerror = function () {
-		logEvent("DeviceControlService startSession callback");
+		logEvent("HealthManagerService startSession callback");
 		let tips = "终端链接失败"
 		ModalStyle(tips, 'pathN')
 	};
@@ -293,9 +294,9 @@ function ReadCenterConfig(readType,readConfig){
 	req.reserved3 = ''
 	req.reserved4 = ''
 	req.timeout = 60000
-	logEvent("DeviceControlService->ReadCenterConfigStr");
+	logEvent("HealthManagerService->ReadCenterConfigStr");
 	
-	DeviceControlService.ReadCenterConfigStr(req, function(ret) {
+	HealthManagerService.ReadCenterConfigStr(req, function(ret) {
 		logEvent("ReadCenterConfigStr ret: "+JSON.stringify(ret));
 		console.log('ReadCenterConfigStr----',ret)
 		if(ret){

+ 64 - 7
addin/res/ManagerDesktop/js/navOprator.js

@@ -131,14 +131,64 @@ function downLoadv3(value){
 }
 // *********************下载集中配置 End*********************/
 
+/**
+ * @description: 读取配置 value=1,可以跳过扫码,直接重置密钥
+ * @param {} 
+ * @return: value=1
+ */
+let jumpScan = false //是否跳过扫码
+function ReadCenterScanConfig(){
+	$('#loadContent').fadeIn('slow');
+	let timeoutFn= setTimeout(function(){
+		$('#loadContent').fadeOut('slow')
+		let tips = '请求超时'
+		ModalStyle(tips,'pathN')
+	},timeout)
+
+	let req = new Request();
+	req["{e12a3dc0-3a0b-47c4-a8c3-75190a42ae68}"]={
+		entity: 'AccessAuthorization' ,
+		key: 'SkipScanCode' ,
+		reserved1: 0,
+		reserved2: 0,
+		reserved3: '',
+		reserved4: '',
+		timeout: 60000,
+	}
+	HealthManagerService.ReadCenterConfigStr(req, function(ret) {
+		logEvent("ReadCenterConfigStr ret: "+JSON.stringify(ret));
+		console.log('ReadCenterScanConfig----',ret)
+		if(ret){
+			$('#loadContent').fadeOut('slow');
+			clearTimeout(timeoutFn)
+		}
+		if(ret.errorCode ===0&&ret.value==1){
+			jumpScan = true 
+
+		}else{
+			jumpScan = false 
+		}
+	})
+}
+
+
 // 密钥初始化Btn
 function resetRSA(){
   $('#entityCheckout').fadeOut()
 	$('#serverNoAccess').fadeOut()
   $('#navBtns').fadeOut() //二维码没有菜单btns
-	setTimeout(()=>{ //延时显示,避免内容污染
-		$('#scanIdentity').css({display:'flex'});
-	},300)
+	console.log('jumpScan---',jumpScan)
+	if(jumpScan){
+		setTimeout(()=>{ //延时显示,避免内容污染
+			$('#RSAReseting').css({display:'flex'});
+			initializeNew('admin')
+		},500)
+	}else{
+		setTimeout(()=>{ //延时显示,避免内容污染
+			$('#scanIdentity').css({display:'flex'});
+		},300)
+	}
+	
 	getHardwareInfo()
 }
 
@@ -154,8 +204,13 @@ window.onmessage = (event) => {
 		setTimeout(()=>{ //延时显示,避免内容污染
 			$('#RSAReseting').css({display:'flex'});
 		},300)
-    
-		document.getElementById('restDot').innerHTML = '重置设备密钥中,稍后自动重启应用<dot class="dot">●●●●●●</dot>'
+		if(navigator.userAgent.toLowerCase().indexOf('windows')<0){
+			document.getElementById('restDot').innerHTML = '重置设备密钥中,稍后自动重启应用<dot class="dot-uos">●●●●●●</dot>'
+
+		}else{
+			document.getElementById('restDot').innerHTML = '重置设备密钥中,稍后自动重启应用<dot class="dot">●●●●●●</dot>'
+
+		}
 
   }
 };
@@ -172,6 +227,7 @@ function initializeNew(code){
     ModalPrompt(tips,'pathN','InitializeNew')
     stopAnimation();
 		document.getElementById('restDot').innerHTML = '重置设备密钥失败,请重试或联系厂商维修'
+		$('.hardwareConfig').fadeIn()
   },timeout)
 
   //重置密钥
@@ -190,7 +246,7 @@ function initializeNew(code){
         let tips = ret.ErrMsg ? ret.ErrMsg : '重置密钥失败'
         ModalPrompt(tips,'pathN','InitializeNew')
 				document.getElementById('restDot').innerHTML = '重置设备密钥失败,请重试或联系厂商维修'
-
+				$('.hardwareConfig').fadeIn()
       }else{
         let tips = '加载主密钥成功'
         ModalPrompt(tips,'pathY')
@@ -205,11 +261,12 @@ function initializeNew(code){
 			let tips = ret.errorMsg ? ret.errorMsg : '重置密钥失败'
 			ModalPrompt(tips,'pathN','InitializeNew')
 			document.getElementById('restDot').innerHTML = '重置设备密钥失败,请重试或联系厂商维修'
-
+			$('.hardwareConfig').fadeIn()
     }
   });
 }
 
+
 function startAnimation(){
 	let elem = document.querySelector('.dot');
 	if(elem){

+ 5 - 1
addin/res/ManagerDesktop/serverNoAccess.html

@@ -125,7 +125,11 @@
 			<div class="modal" id="modal">
 				<img src="./images/success.png" />
 				<p class="fz_24" id="errTips"></p>
-				<button class="fz_23 btn-blues" onclick="closeModal('prompt')">确定</button>
+				<div class="prompt-btns">
+					<button class="fz_23 btn-gray hardwareConfig" onclick="hardwareConfig()">硬件配置</button>
+					<button class="fz_23 btn-blues" onclick="closeModal('prompt')">确定</button>
+					<p class="hardwareConfig">请确认密码键盘配置是否正确,如需修改请使用硬件配置</p>
+				</div>
 			</div>
 		</div>
 		<!-- 提示框 -->

+ 1 - 1
addin/res/ManagerDesktop/showStatus.html

@@ -224,7 +224,7 @@
         let req = new Request();
 	    req.type = 4;
 
-	    DeviceControlService.QueryHardwareInfo(req, function(ret) {
+	    HealthManagerService.QueryHardwareInfo(req, function(ret) {
 		    //logEvent("GetAccessUrl ret: "+JSON.stringify(ret));
 		    console.log("QueryHardwareInfo ret: "+JSON.stringify(ret));
 		    if(ret.machineType != "RVC.PAD"){