|
|
@@ -53,8 +53,10 @@ router.beforeEach(async (to, from, next) => {
|
|
|
if (to.path === "/redirect") {
|
|
|
if (to.query.userId) {
|
|
|
const { token, user } = await api.auth.oa.getUserToken(to.query);
|
|
|
- tool.cookie.set("TOKEN", token);
|
|
|
- tool.data.set("USER_INFO", user.user);
|
|
|
+ if (!token) {
|
|
|
+ tool.cookie.set("TOKEN", token);
|
|
|
+ tool.data.set("USER_INFO", user.user);
|
|
|
+ } else tool.data.set("OA_USER_INFO", user.user);
|
|
|
}
|
|
|
next(to.query.path && to.fullPath.replace("/redirect", to.query.path) || from.fullPath);
|
|
|
return false;
|