From 12cf68ea971e5c39e884474734ef51cbc52bec8d Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期六, 23 三月 2024 18:05:29 +0800
Subject: [PATCH] 登录接口重新联调

---
 src/views/other/login/index.vue |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/views/other/login/index.vue b/src/views/other/login/index.vue
index 0d8cfde..df4544e 100644
--- a/src/views/other/login/index.vue
+++ b/src/views/other/login/index.vue
@@ -145,28 +145,32 @@
      */
     // 鎻愪氦鐧诲綍淇℃伅
     submit() {
-      this.$refs.loginForm.validate((valid) => {
+      this.$refs.loginForm.validate(async (valid) => {
         if (valid) {
           // 鐧诲綍
-          login({
+          await login({
             username: this.formLogin.username,
             password: this.formLogin.password,
             captcha: this.formLogin.code,
             captchaId: this.captchaId
           }).then((res) => {
+            console.log(res, "dddd")
             if (res.code == 200) {
+              console.log(res, "8888")
               this.$message.success("鐧诲綍鎴愬姛")
-              this.$router.push({ path: "/orderManageModule/orderManage" })
               localStorage.setItem("token", res.data.token)
               localStorage.setItem("username", res.data.user.username)
               localStorage.setItem("uuid", res.data.user.id)
+              setTimeout(() => {
+                this.$router.push({ path: "/orderManageModule/orderManage" })
+              }, 2000)
             } else {
               this.$message.warning(res.msg)
               if (res.msg == "楠岃瘉鐮侀敊璇�") {
                 this.getCaptchaData()
               }
+              return
             }
-            console.log(res, "dddd")
           })
         } else {
           // 鐧诲綍琛ㄥ崟鏍¢獙澶辫触

--
Gitblit v1.8.0