(ie10,ie11)
开发环境下:
:在 Access-Control-Allow-Origin 标头中未找到源 http://192.168.200.243:8077。
SCRIPT7002: XMLHttpRequest: 网络错误 0x80700013, 由于出现错误 80700013 而导致此项操作无法完成。
jQuery.support.cors = true; // 允许跨域请求
$.ajax({
type: 'get',
url: api.user.getSystemUser,
xhrFields: {withCredentials: true},
success: function (ret) {
if (ret.code === 200) {
// console.log(url,txt,menuId);
url = url + '?token=' + ret.obj.token + '&tabId=' + menuId;
open_addTab(url,txt,menuId);
} else {
window.location.href = constant.URL.PATH_LOGIN;
}
}
});
jQuery.support.cors = true; // 允许跨域请求
$.ajax({
type: 'get',
contentType: 'application/x-www-form-urlencoded;charset=UTF-8',
cache : false, // 必须设置为false,否则在ie11及以下浏览器,接口判断当前登录用户的状态仍是未登录
url: api.user.getSystemUser,
xhrFields: {withCredentials: true},
success: function (ret) {
if (ret.code === 200) {
// console.log(url,txt,menuId);
url = url + '?token=' + ret.obj.token + '&tabId=' + menuId;
open_addTab(url,txt,menuId);
} else {
window.location.href = constant.URL.PATH_LOGIN;
}
}
});