|
|
@@ -61,6 +61,7 @@ service.interceptors.response.use(res => { |
|
|
|
const code = res.data.code || 200; |
|
|
|
// 获取错误信息 |
|
|
|
const msg = errorCode[code] || res.data.msg || errorCode['default'] |
|
|
|
|
|
|
|
if (code === 401) { |
|
|
|
Dialog.confirm({ |
|
|
|
title: '系统提示', |
|
|
@@ -81,25 +82,41 @@ service.interceptors.response.use(res => { |
|
|
|
|
|
|
|
if (window.location.href.indexOf('/lawEnforcement') != -1) { |
|
|
|
window.location.href = '/lawEnforcement/login'; |
|
|
|
} else if (window.location.href.indexOf('/authenticRight') != -1) { |
|
|
|
return; |
|
|
|
} |
|
|
|
if (window.location.href.indexOf('/authenticRight') != -1) { |
|
|
|
window.location.href = '/authenticRight/login'; |
|
|
|
} else if (window.location.href.indexOf('/homesteadSurvey') != -1) { |
|
|
|
return; |
|
|
|
} |
|
|
|
if (window.location.href.indexOf('/homesteadSurvey') != -1) { |
|
|
|
window.location.href = '/homesteadLogin'; |
|
|
|
} else if (window.location.href.indexOf('/onlineHome') != -1) { |
|
|
|
return; |
|
|
|
} |
|
|
|
if (window.location.href.indexOf('/onlineHome') != -1) { |
|
|
|
window.location.href = '/zjdLogin'; |
|
|
|
} else if (window.location.href.indexOf('/yinnong') != -1) { |
|
|
|
return; |
|
|
|
} |
|
|
|
if (window.location.href.indexOf('/yinnong') != -1) { |
|
|
|
window.location.href = '/yinnongLogin'; |
|
|
|
} else if (window.location.href.indexOf('/sunVillage_info/') != -1) { |
|
|
|
return; |
|
|
|
} |
|
|
|
if (window.location.href.indexOf('/sunVillage_info/') != -1) { |
|
|
|
window.location.href = '/sunVillage_info/login'; |
|
|
|
} else if (window.location.href.indexOf('/sunVillage') != -1) { |
|
|
|
return; |
|
|
|
} |
|
|
|
if (window.location.href.indexOf('/sunVillage') != -1) { |
|
|
|
window.location.href = '/sunVillage/login'; |
|
|
|
} else if (window.location.href.indexOf('/homestead/') != -1) { |
|
|
|
return; |
|
|
|
} |
|
|
|
if (window.location.href.indexOf('/homestead/') != -1) { |
|
|
|
window.location.href = '/homestead/login'; |
|
|
|
}else if (window.location.href.indexOf('/agriculturalTrusteeship') != -1){ |
|
|
|
return; |
|
|
|
} |
|
|
|
if (window.location.href.indexOf('/agriculturalTrusteeship') != -1){ |
|
|
|
window.location.href = '/agriculturalTrusteeship/login'; |
|
|
|
} else { |
|
|
|
window.location.href = '/login'; |
|
|
|
return; |
|
|
|
} |
|
|
|
window.location.href = '/login'; |
|
|
|
}) |
|
|
|
}) |
|
|
|
} else if (code === 500) { |
|
|
|