文章讨论 axios 在 IE9 下指定 responseType 为 json 时请求报错的问题:IE9 只返回 responseText 而不返回 data。解决方案是在 main.js 中添加响应拦截器,当 data 为空且 responseType 为 json 时,用 JSON.parse 解析 responseText 并赋给 response.data,从而修复异常。
完成下面两步后,将自动完成登录并继续当前操作。