|
@@ -6,11 +6,9 @@ require("./modal.js")
|
|
|
const {
|
|
|
ywCheckApi
|
|
|
} = require('./api.js');
|
|
|
-const {
|
|
|
- contains
|
|
|
-} = require('jquery');
|
|
|
+
|
|
|
require('./scrollBar.js');
|
|
|
-const baseUrl = '' //'http://192.168.3.184:5859' //'http://192.168.2.236:5858' //'http://192.168.2.236:5858';//
|
|
|
+const baseUrl = '';
|
|
|
//页面映射
|
|
|
const pageMap = {
|
|
|
'YH-KZT': 'console.html',
|
|
@@ -184,14 +182,16 @@ const post = function (url, data, opts) {
|
|
|
}
|
|
|
},
|
|
|
success: function (res) {
|
|
|
- if(res.code==="0"){
|
|
|
+ const code = res.code;
|
|
|
+ const isOut = code === '10020011' || code === '10020012' || code === '10020013';
|
|
|
+ if(isOut){
|
|
|
+ //登录信息失效处理
|
|
|
+ unloginPop(res.code);
|
|
|
+ }else{
|
|
|
resolve({
|
|
|
data: res
|
|
|
});
|
|
|
- return;
|
|
|
}
|
|
|
- //登录信息失效处理
|
|
|
- unloginPop(res.code);
|
|
|
},
|
|
|
error: function (error) {
|
|
|
if (error.status === 403 || error.status === 401) {
|
|
@@ -226,9 +226,9 @@ const post = function (url, data, opts) {
|
|
|
};
|
|
|
|
|
|
//登录失效弹窗处理
|
|
|
-function unloginPop(code){
|
|
|
- const isOut = code === '10020011' || code === '10020012' || code === '10020013';
|
|
|
- if(isOut){
|
|
|
+function unloginPop(code,callback){
|
|
|
+ /*const isOut = code === '10020011' || code === '10020012' || code === '10020013';
|
|
|
+ if(isOut){*/
|
|
|
if(self != top){
|
|
|
const dialogmessage = {
|
|
|
iframemessage: 1,
|
|
@@ -252,7 +252,9 @@ function unloginPop(code){
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
- }
|
|
|
+ /*}else{
|
|
|
+ callback()
|
|
|
+ }*/
|
|
|
|
|
|
}
|
|
|
|