Преглед изворни кода

检测新版本出错,继续执行

Michael Wang пре 5 година
родитељ
комит
c9d5a0d180
1 измењених фајлова са 6 додато и 2 уклоњено
  1. 6 2
      src/features/Login/Login.vue

+ 6 - 2
src/features/Login/Login.vue

@@ -302,8 +302,12 @@ export default {
       }
       this.loginBtnLoading = true;
 
-      const hasNewVersion = await this.checkNewVersion();
-      if (hasNewVersion) return;
+      try {
+        const hasNewVersion = await this.checkNewVersion();
+        if (hasNewVersion) return;
+      } catch (error) {
+        console.log("检测新版本出错");
+      }
 
       this.loginTimeout = setTimeout(() => {
         this.loginBtnLoading = false;