add tips
This commit is contained in:
@@ -26,27 +26,26 @@ service.interceptors.request.use(config => {
|
||||
// respone拦截器
|
||||
service.interceptors.response.use(
|
||||
response => response
|
||||
/**
|
||||
* 下面的注释为通过response自定义code来标示请求状态,当code返回如下情况为权限有问题,登出并返回到登录页
|
||||
* 如通过htmlrequest 状态码标示 逻辑可写在下面error中
|
||||
*/
|
||||
|
||||
/**
|
||||
/**
|
||||
* 下面的注释为通过response自定义code来标示请求状态,当code返回如下情况为权限有问题,登出并返回到登录页
|
||||
* 如通过htmlrequest 状态码标示 逻辑可写在下面error中
|
||||
*/
|
||||
// const code = response.data.code;
|
||||
// // 50014:Token 过期了 50012:其他客户端登录了 50008:非法的token
|
||||
// if (code === 50008 || code === 50014 || code === 50012) {
|
||||
// Message({
|
||||
// message: res.message,
|
||||
// type: 'error',
|
||||
// duration: 5 * 1000
|
||||
// });
|
||||
// // 登出
|
||||
// store.dispatch('FedLogOut').then(() => {
|
||||
// router.push({ path: '/login' })
|
||||
// });
|
||||
// } else {
|
||||
// return response
|
||||
// }
|
||||
// const code = response.data.code;
|
||||
// // 50014:Token 过期了 50012:其他客户端登录了 50008:非法的token
|
||||
// if (code === 50008 || code === 50014 || code === 50012) {
|
||||
// Message({
|
||||
// message: res.message,
|
||||
// type: 'error',
|
||||
// duration: 5 * 1000
|
||||
// });
|
||||
// // 登出
|
||||
// store.dispatch('FedLogOut').then(() => {
|
||||
// router.push({ path: '/login' })
|
||||
// });
|
||||
// } else {
|
||||
// return response
|
||||
// }
|
||||
,
|
||||
error => {
|
||||
console.log('err' + error);// for debug
|
||||
|
Reference in New Issue
Block a user