Commit aafa21a7 authored by 潘自豪's avatar 潘自豪

去除硬编码

parent 772a5894
...@@ -44,6 +44,9 @@ export default async (url = '', data = {}, type = 'GET', method = 'fetch') => { ...@@ -44,6 +44,9 @@ export default async (url = '', data = {}, type = 'GET', method = 'fetch') => {
try { try {
const response = await fetch(url, requestConfig); const response = await fetch(url, requestConfig);
const responseJson = await response.json(); const responseJson = await response.json();
if(response.status === 403){
parent.window.location = "/";
}
return responseJson return responseJson
} catch (error) { } catch (error) {
throw new Error(error) throw new Error(error)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment