|
@@ -34,7 +34,9 @@ const guard = (router: Router) => {
|
|
|
|
|
|
//检测token状态,token为空直接跳转至登陆链接,token存在则请求某个接口验证token有效性
|
|
//检测token状态,token为空直接跳转至登陆链接,token存在则请求某个接口验证token有效性
|
|
if (store.getters.getToken === "") {
|
|
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`);
|
|
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 {
|
|
} else {
|
|
userInfo();
|
|
userInfo();
|