- 后端:更新 README

- 后端:重构部分代码
This commit is contained in:
YunaiV
2019-05-17 19:23:26 +08:00
parent 68027b9f16
commit dbf2a43924
108 changed files with 589 additions and 1017 deletions

View File

@@ -229,11 +229,11 @@ service.interceptors.response.use(
// TODO token 过期
// TODO 需要拿 refresh token 置换
if (code === 1001001011 // 访问令牌不存在
|| code === 1001001013 // 访问令牌已失效
|| code === 1001001021 // 刷新令牌不存在
|| code === 1001001022 // 刷新令牌已过期
|| code === 1001001023) { // 刷新令牌已失效
if (code === 1002001011 // 访问令牌不存在
|| code === 1002001013 // 访问令牌已失效
|| code === 1002001017 // 刷新令牌不存在
|| code === 1002001018 // 刷新令牌已过期
|| code === 1002001019) { // 刷新令牌已失效
Dialog.confirm({
title: '系统提示',
message: res.message,
@@ -249,7 +249,7 @@ service.interceptors.response.use(
}
}
});
} else if (code === 1001001012) { // 访问令牌已过期
} else if (code === 1002001012) { // 访问令牌已过期
return refreshToken(response);
} else {
Dialog.alert({