From 1e09a7a01a6c1888e1a2a832eb007fb8c2b653a0 Mon Sep 17 00:00:00 2001
From: ZZJ <zzjdsg2300@163.com>
Date: 星期三, 26 一月 2022 11:06:27 +0800
Subject: [PATCH] Merge branch 'bhomebus' of http://192.168.5.5:10010/r/web/vue-smart-ai into bhomebus

---
 src/pages/index/App.vue |   28 +++++++++++++++++++++++-----
 1 files changed, 23 insertions(+), 5 deletions(-)

diff --git a/src/pages/index/App.vue b/src/pages/index/App.vue
index 6cceda5..44594c8 100644
--- a/src/pages/index/App.vue
+++ b/src/pages/index/App.vue
@@ -55,6 +55,14 @@
 } from "./api";
 
 export default {
+  created() {
+    window.addEventListener("keydown", (event) => {
+      if (event.keyCode === 9) {
+        console.log("tabfalse13");
+        event.preventDefault();
+      }
+    });
+  },
   mounted() {
     this.getInitInfo();
     let message = "缃戠粶姝e父";
@@ -139,9 +147,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,14 +162,20 @@
         }, 0);
       }
 
-      /* if (res.data.initPwd && res.data.initRegInfo) {
-        location.assign("/login");
+      if (res.data && res.data.initPwd && res.data.initRegInfo) {
+        location.assign("/view/login/");
         return;
-      } */
+      }
 
       this.isWhite = false;
     },
   },
+  destroyed() {
+    window.removeEventListener("keydown", (event) => {
+      console.log(event.value);
+      event.preventDefault();
+    });
+  },
 };
 </script>
 

--
Gitblit v1.8.0