diff --git a/src/flows_api.js b/src/flows_api.js index 940588d5..55bd55f7 100644 --- a/src/flows_api.js +++ b/src/flows_api.js @@ -7,6 +7,12 @@ export { get_json }; const SEARCH_PAGESIZE = 50; const handle_response = async (response, notify = false) => { + if (response.status === 401) { + alert('token无效或过期'); + window.localStorage.removeItem('TOKEN'); + window.location.reload(); + return; + } let json = await get_json(response); if (json.code !== 0) { if (json.msg) {