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

+ 7 - 1
src/router/index.js

@@ -37,7 +37,13 @@ router.beforeEach(async (to, from, next) => {
     LibForWeixin.auth();
     LibForWeixin.auth();
     return;
     return;
   }
   }
-  if (!appStore.globalConfig && to.name !== "WxLogin" && userStore.openId) {
+  if (
+    !appStore.globalConfig &&
+    to.name !== "WxLogin" &&
+    (userStore.openId ||
+      pattern.test(location.hostname) ||
+      location.hostname === "apply-test.qmth.com.cn")
+  ) {
     let config = await appStore.getGlobalConfig();
     let config = await appStore.getGlobalConfig();
     if (((config && !config?.taskTitle) || !config) && to.name !== "Login") {
     if (((config && !config?.taskTitle) || !config) && to.name !== "Login") {
       next({ name: "Login", replace: true });
       next({ name: "Login", replace: true });