From a70881cad8fe749f41b06f221d10bb7491259256 Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期一, 25 三月 2024 14:40:22 +0800
Subject: [PATCH] 发货完成状态接口联调、页面数据处理

---
 src/views/other/login/index.vue |   29 ++++++++++++++---------------
 1 files changed, 14 insertions(+), 15 deletions(-)

diff --git a/src/views/other/login/index.vue b/src/views/other/login/index.vue
index 794c981..dd4d2f1 100644
--- a/src/views/other/login/index.vue
+++ b/src/views/other/login/index.vue
@@ -145,31 +145,30 @@
      */
     // 鎻愪氦鐧诲綍淇℃伅
     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((rsp) => {
-            // 閲嶅畾鍚戝璞′笉瀛樺湪鍒欒繑鍥為《灞傝矾寰�
-            if (rsp != "") {
-              // this.$message.warning(rsp);
-              this.error = "濉叆淇℃伅閿欒锛岃妫�鏌ワ紒"
-              let _this = this
-              setTimeout(function () {
-                _this.error = ""
-              }, 3000)
-              if (rsp.indexOf("楠岃瘉鐮侀敊璇�") > -1) {
+          }).then((res) => {
+            if (res.code == 200) {
+              this.$message.success("鐧诲綍鎴愬姛")
+              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" })
+              }, 1000)
+            } else {
+              this.$message.warning(res.msg)
+              if (res.msg == "楠岃瘉鐮侀敊璇�") {
                 this.getCaptchaData()
               }
               return
             }
-            this.$router.push({ path: "/commonWeb" })
           })
         } else {
           // 鐧诲綍琛ㄥ崟鏍¢獙澶辫触

--
Gitblit v1.8.0