From bc630b555653be1cb6eff37ab2da18cd31e8ef81 Mon Sep 17 00:00:00 2001
From: ZZJ <zzjdsg2300@163.com>
Date: 星期一, 13 十二月 2021 10:44:12 +0800
Subject: [PATCH] 配置页

---
 src/pages/index/App.vue |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/pages/index/App.vue b/src/pages/index/App.vue
index 5fc814d..9e13cdd 100644
--- a/src/pages/index/App.vue
+++ b/src/pages/index/App.vue
@@ -51,7 +51,7 @@
 } from "./api";
 
 export default {
-  created() {
+  mounted() {
     this.getInitInfo();
   },
   data() {
@@ -78,7 +78,7 @@
       if (this.active == 2) {
         const data = this.$refs[`form${this.active}`].getFormData();
         await saveRegInfo(data);
-        location.assign("/login");
+        location.assign("/view/login");
         return;
       }
 
@@ -106,11 +106,14 @@
       if (res.data.initPwd && !res.data.initRegInfo) {
         const res1 = await getRegInfo();
         this.active = 1;
-        this.$refs["carousel"].setActiveItem(1);
+        console.log(res1);
+        setTimeout(() => {
+          this.$refs["carousel"].setActiveItem(1);
+        }, 0);
       }
 
       if (res.data.initPwd && res.data.initRegInfo) {
-        location.assign("/login");
+        location.assign("/view/login");
         return;
       }
 

--
Gitblit v1.8.0