request:增加访问令牌的刷新机制!

This commit is contained in:
YunaiV
2024-01-20 12:46:19 +08:00
parent 978422df93
commit 80f80e358f
3 changed files with 98 additions and 13 deletions
+15
View File
@@ -50,6 +50,20 @@ const AuthUtil = {
method: 'POST',
});
},
// 刷新令牌
refreshToken: (refreshToken) => {
return request({
url: '/app-api/member/auth/refresh-token',
method: 'POST',
params: {
refreshToken
},
custom: {
loading: false, // 不用加载中
showError: false, // 不展示错误提示
},
});
},
// 社交授权的跳转
socialAuthRedirect: (type, redirectUri) => {
return request({
@@ -112,6 +126,7 @@ const AuthUtil = {
},
})
},
//
};
export default AuthUtil;