From fa44bcc2861fe56e8af50fbd8f56065250a2ece3 Mon Sep 17 00:00:00 2001
From: ZZJ <zzjdsg2300@163.com>
Date: 星期四, 06 一月 2022 10:08:07 +0800
Subject: [PATCH] 报错处理

---
 vue.config.js           |    2 +-
 src/pages/index/App.vue |   10 +++++++---
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/pages/index/App.vue b/src/pages/index/App.vue
index ebc00eb..892268e 100644
--- a/src/pages/index/App.vue
+++ b/src/pages/index/App.vue
@@ -139,9 +139,13 @@
       this.$refs["carousel"].next();
     },
     async getInitInfo() {
-      const res = await getInitInfo();
+      const res = await getInitInfo().catch((err) => {
+        this.isWhite = false;
+      });
 
-      if (res.data.initPwd && !res.data.initRegInfo) {
+      console.log(res);
+
+      if (res.data && res.data.initPwd && !res.data.initRegInfo) {
         const res1 = await getRegInfo();
         this.active = 1;
         console.log(res1);
@@ -150,7 +154,7 @@
         }, 0);
       }
 
-      if (res.data.initPwd && res.data.initRegInfo) {
+      if (res.data && res.data.initPwd && res.data.initRegInfo) {
         location.assign("/view/login/");
         return;
       }
diff --git a/vue.config.js b/vue.config.js
index d64f6f1..29b52cf 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -41,7 +41,7 @@
 });
 
 const serverUrl = "http://192.168.20.189:7009"; // 缇婁簲//
-// const serverUrl = "http://192.168.8.10:7009";
+//  const serverUrl = "http://192.168.8.10:7009";
 const serverUrl2 = "http://192.168.8.10:9000";
 // const serverUrl = "http://192.168.20.10:7009";
 // const serverUrl2 = "http://192.168.20.10:9000";

--
Gitblit v1.8.0