zhuangyunsheng 1 年之前
父節點
當前提交
11e9f4d94f
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/router/index.js

+ 1 - 1
src/router/index.js

@@ -51,7 +51,7 @@ router.beforeEach(async (to, from, next) => {
 	let token = tool.cookie.get("TOKEN");
 
 	if (to.path === "/redirect") {
-		if (!token) {
+		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);