|
@@ -141,41 +141,7 @@ const getUrlArgObjectNew = function (name, srcUrl) {
|
|
|
return obj[name];
|
|
|
};
|
|
|
window.abortAjax = '';
|
|
|
-//显示登出提示:被挤和过期
|
|
|
-function alertQuitPop(msg, type) {
|
|
|
- localStorage.removeItem('accessToken')
|
|
|
- console.log('token已清除utils')
|
|
|
- if (type) { //父窗口请求登出
|
|
|
- $.alerModal({
|
|
|
- gobackBtn: true,
|
|
|
- title: "提示",
|
|
|
- type: "modal",
|
|
|
- width: '470',
|
|
|
- time: 1000,
|
|
|
- cancalText: '我知道了',
|
|
|
- sureBtn: false,
|
|
|
- message: msg || '登录过期',
|
|
|
- callback: function () {
|
|
|
-
|
|
|
- //alert('跳回登录2')
|
|
|
- // localStorage.removeItem('accessToken')
|
|
|
- // if (window.parent) {
|
|
|
- // window.parent.window.location.href = 'login.html'
|
|
|
- // } else {
|
|
|
- // window.location.href = 'login.html'
|
|
|
- // }
|
|
|
- window.location.href = 'login.html'
|
|
|
- }
|
|
|
- });
|
|
|
- } else { //子窗口请求登出
|
|
|
- const dialogmessage = {
|
|
|
- iframemessage: 1,
|
|
|
- data: jsonres.msg
|
|
|
- }
|
|
|
- window.parent.postMessage(JSON.stringify(dialogmessage), '*')
|
|
|
- }
|
|
|
|
|
|
-}
|
|
|
const post = function (url, data, opts) {
|
|
|
let isPlacefile = getCookie('isPlacefile') || 1;
|
|
|
const token = localStorage.getItem('accessToken');
|
|
@@ -213,9 +179,11 @@ const post = function (url, data, opts) {
|
|
|
})),
|
|
|
contentType: 'application/json; charset=UTF-8',
|
|
|
beforeSend: function (xmlHttp) {
|
|
|
- xmlHttp.setRequestHeader('If-Modified-Since', '0');
|
|
|
- xmlHttp.setRequestHeader('Cache-Control', 'no-cache');
|
|
|
- xmlHttp.setRequestHeader('Authorization', token ? 'Bearer ' + token : '');
|
|
|
+ if(url.indexOf("sys/user/getHospitalMark")===-1){
|
|
|
+ xmlHttp.setRequestHeader('If-Modified-Since', '0');
|
|
|
+ xmlHttp.setRequestHeader('Cache-Control', 'no-cache');
|
|
|
+ xmlHttp.setRequestHeader('Authorization', token ? 'Bearer ' + token : '');
|
|
|
+ }
|
|
|
},
|
|
|
success: function (res) {
|
|
|
|