From 462782f4b2ce653e84260ca586a58c8627c4ac9c Mon Sep 17 00:00:00 2001
From: Surpriseplus <845948745@qq.com>
Date: 星期五, 18 十一月 2022 13:55:22 +0800
Subject: [PATCH] 1

---
 src/store/index.js |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/src/store/index.js b/src/store/index.js
index 12d743c..dce886f 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -40,6 +40,8 @@
 
     //涓婚鍒囨崲
     theme: variables.theme,
+    //鐧诲綍鐢ㄦ埛鍚�
+    uname: null,
   },
   mutations: {
     //鑾峰彇鏉冮檺鍚堥泦
@@ -105,10 +107,12 @@
         }
       }
     },
+    SET_UNAME(state, name) {
+      state.uname = name;
+    },
     SET_TOKEN(state, token) {
       state.token = token;
     },
-
     SET_KEY(state, key) {
       state.key = key;
     },
@@ -137,6 +141,8 @@
                 duration: 5 * 1000,
               });
             }
+
+            commit('SET_UNAME', data.result.uname);
             commit('SET_TOKEN', data.result.token);
             setToken(data.result.token);
             resolve(data);

--
Gitblit v1.9.3