刘洋 1 year ago
parent
commit
c5a1380c3d
1 changed files with 7 additions and 1 deletions
  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();
     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();
     if (((config && !config?.taskTitle) || !config) && to.name !== "Login") {
       next({ name: "Login", replace: true });