From 0d626ae57149d5ed40a32bd8b808ca6069aa6d5e Mon Sep 17 00:00:00 2001
From: gaosp <gaosp>
Date: 星期日, 14 一月 2024 16:35:08 +0800
Subject: [PATCH] update

---
 src/store/modules/user.js |   19 ++++++++++++-------
 1 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/src/store/modules/user.js b/src/store/modules/user.js
index 26f4fdd..865590e 100644
--- a/src/store/modules/user.js
+++ b/src/store/modules/user.js
@@ -87,10 +87,10 @@
           if (data.result === 'SUCCESS') {
             commit('SET_USER_INFO',data.data)
             this.dispatch('GetPlanList')
-              resolve({ code: 1, data: data })
+            resolve({ code: 1, result: 'SUCCESS',data: data })
           }else {
             removeToken()
-            resolve({ code: 0, msg: '鐢变簬鎮ㄩ暱鏃堕棿娌℃湁鎿嶄綔锛岃閲嶆柊鐧诲綍锛�' })
+            resolve({ code: 0,result: 'SUCCESS', msg: '鐢变簬鎮ㄩ暱鏃堕棿娌℃湁鎿嶄綔锛岃閲嶆柊鐧诲綍锛�' })
           }
         }).catch(() => {
           removeToken()
@@ -100,11 +100,16 @@
       })
     },
     GetPlanList ({ commit, store }) {
-      return getPlanList().then(data => {
-        if (data.result === 'SUCCESS') {
-          commit('SET_WORKSHOP_LIST', data.data || [])
-        }
-        return data
+      return new Promise((resolve,reject) => {
+        getPlanList().then(data => {
+          if (data.result === 'SUCCESS') {
+            commit('SET_WORKSHOP_LIST', data.data || [])
+            resolve({ code: 1,result: 'SUCCESS',data: data })
+          }
+        })
+        .catch(() => {
+          reject(error)
+        })
       })
     },
     // 鐧诲嚭

--
Gitblit v1.9.3