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();