支持接口鉴权,支持修改密码,

This commit is contained in:
panlinlin
2021-04-14 16:33:10 +08:00
parent 123ce171d2
commit cb5849d8a1
20 changed files with 752 additions and 16 deletions

View File

@@ -40,6 +40,18 @@ Vue.prototype.$notify = Notification;
axios.defaults.baseURL = (process.env.NODE_ENV === 'development') ? process.env.BASE_API : "";
// api 返回401自动回登陆页面
axios.interceptors.response.use(function (response) {
// 对响应数据做点什么
return response;
}, function (error) {
// 对响应错误做点什么
if (error.response.status === 401) {
router.push('/login');
}
return Promise.reject(error);
});
Vue.prototype.$cookies.config(60*30);