From 6ac0e6669f3a8ea18c7ac90b37405c65313a1c5f Mon Sep 17 00:00:00 2001
From: kongdeqiang <123456>
Date: 星期五, 26 十二月 2025 16:53:40 +0800
Subject: [PATCH] feat: 修改登录bug

---
 src/components/page/Login.vue |   35 ++++++++++++++++++++---------------
 1 files changed, 20 insertions(+), 15 deletions(-)

diff --git a/src/components/page/Login.vue b/src/components/page/Login.vue
index be8da3c..ac8807a 100644
--- a/src/components/page/Login.vue
+++ b/src/components/page/Login.vue
@@ -59,22 +59,27 @@
                     if (valid) {
                         var url = this.$systemconfig.basePath + '/ffzf/user/login';
                         this.$byutil.postData(this,url,this.ruleForm,res=>{
+                          if (res.code == 0) {
                             let data = res.data;
-                          if (data) {
-                            localStorage.userId = data.id;
-                            localStorage.name = data.name;
-                            localStorage.type = data.type;
-                            // localStorage.userRouters = JSON.stringify(this.items) ;
-                            this.SET_ROLES(data.type)
-                            this.SET_ROLELISt();  // 绛涢�夊乏渚ц彍鍗曟爮
-                            this.$router.push({'path': this.resultAsyncRoutes[0].children[0].indexUrl || '/home'});
-                             // 鑷姩璺宠浆褰撳墠鏉冮檺璺敱鐨勭涓�涓〉闈� 锛屽鏋滄壘涓嶅埌灏卞幓璺砲ome
-                            // if (this._isMobile()) {
-                            //     this.$router.push({'path': '/index4'});
-                            // } else {
-                            //     this.$router.push({'path': '/index'});
-                            // }
-                        }
+                            if (data) {
+                              localStorage.userId = data.id;
+                              localStorage.name = data.name;
+                              localStorage.type = data.type;
+                              // localStorage.userRouters = JSON.stringify(this.items) ;
+                              this.SET_ROLES(data.type)
+                              this.SET_ROLELISt();  // 绛涢�夊乏渚ц彍鍗曟爮
+                              this.$router.push({'path': this.resultAsyncRoutes[0].children[0].indexUrl || '/home'});
+                              // 鑷姩璺宠浆褰撳墠鏉冮檺璺敱鐨勭涓�涓〉闈� 锛屽鏋滄壘涓嶅埌灏卞幓璺砲ome
+                              // if (this._isMobile()) {
+                              //     this.$router.push({'path': '/index4'});
+                              // } else {
+                              //     this.$router.push({'path': '/index'});
+                              // }
+                            }
+                        }else {
+                            this.$message.error(res.msg);
+                          }
+
                     })
                     } else {
                         return false;

--
Gitblit v1.9.1