|
@@ -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){
|