wyling007 пре 3 година
родитељ
комит
f2c39b10d2
1 измењених фајлова са 3 додато и 1 уклоњено
  1. 3 1
      src/route/guard.ts

+ 3 - 1
src/route/guard.ts

@@ -34,7 +34,9 @@ const guard = (router: Router) => {
 
 		//检测token状态,token为空直接跳转至登陆链接,token存在则请求某个接口验证token有效性
 		if (store.getters.getToken === "") {
-			if (to.path === "/marked") return;
+			if (to.path === "/marked") {
+				next();
+			}
 			location.replace(`https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx67ca1b8c9816ef28&redirect_uri=${location.href}&response_type=code&scope=snsapi_userinfo&state=LOGIN#wechat_redirect`);
 		} else {
 			userInfo();