提交 009f0fca 编写于 作者: huangwensu's avatar huangwensu

IE上传问题修复

上级 77ca9695
...@@ -65,7 +65,7 @@ export default { ...@@ -65,7 +65,7 @@ export default {
if (isNotEmptyUtils(paramMap["token"])) { if (isNotEmptyUtils(paramMap["token"])) {
vm.token = paramMap["token"] vm.token = paramMap["token"]
localStorage.setItem('storageToken', vm.token) localStorage.setItem('storageToken', vm.token)
// vm.$router.push({ path: 'home' }) vm.$router.push({ path: 'home' })
} else { } else {
if(!localStorage.getItem('storageToken')) { if(!localStorage.getItem('storageToken')) {
window.location.href = getLoginUrl('?from=work&type=logout') // 没有token返回登录页面 window.location.href = getLoginUrl('?from=work&type=logout') // 没有token返回登录页面
......
...@@ -21,7 +21,6 @@ export default async(url = '', data = {}, type = 'POST', method = 'fetch',server ...@@ -21,7 +21,6 @@ export default async(url = '', data = {}, type = 'POST', method = 'fetch',server
url = url + '?' + dataStr; url = url + '?' + dataStr;
// url = encodeURI(url + '?' + dataStr, true); // url = encodeURI(url + '?' + dataStr, true);
} }
console.log("==========================",url)
} }
if (window.fetch && method == 'fetch') { if (window.fetch && method == 'fetch') {
...@@ -60,16 +59,14 @@ export default async(url = '', data = {}, type = 'POST', method = 'fetch',server ...@@ -60,16 +59,14 @@ export default async(url = '', data = {}, type = 'POST', method = 'fetch',server
} else { } else {
requestObj = new ActiveXObject; requestObj = new ActiveXObject;
} }
let sendData = ''; let sendData = '';
if (type == 'POST' || type == 'DELETE' || type == 'PUT') { if (type == 'POST' || type == 'DELETE' || type == 'PUT') {
sendData = JSON.stringify(data); sendData = JSON.stringify(data);
} }
requestObj.open(type, url, true); requestObj.open(type, url, true);
requestObj.setRequestHeader("Content-Type", "application/json"); requestObj.setRequestHeader("Content-Type", "application/json");
requestObj.setRequestHeader("sysCode", "3");
requestObj.send(sendData); requestObj.send(sendData);
requestObj.onreadystatechange = () => { requestObj.onreadystatechange = () => {
if (requestObj.readyState == 4) { if (requestObj.readyState == 4) {
if (requestObj.status == 200) { if (requestObj.status == 200) {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册