From 72524446c3f1b9512906ff9fd249d23202420114 Mon Sep 17 00:00:00 2001 From: feige <791364011@qq.com> Date: 星期二, 03 九月 2024 00:06:54 +0800 Subject: [PATCH] 修改了权限和家谱图姓名 --- ruoyi-ui/src/store/modules/user.js | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ruoyi-ui/src/store/modules/user.js b/ruoyi-ui/src/store/modules/user.js index 7428be4..9adfbb6 100644 --- a/ruoyi-ui/src/store/modules/user.js +++ b/ruoyi-ui/src/store/modules/user.js @@ -7,6 +7,7 @@ name: '', avatar: '', clanId: '', + userId: '', roles: [], permissions: [] }, @@ -30,13 +31,16 @@ SET_CLANID: (state, clanId) => { state.clanId = clanId }, + SET_USERID: (state, userId) => { + state.userId = userId + }, }, actions: { // 鐧诲綍 Login({ commit }, userInfo) { - const username = userInfo.username.trim() + const nickname = userInfo.nickName.trim() const password = userInfo.password const code = userInfo.code @@ -44,7 +48,7 @@ const uuid = userInfo.uuid return new Promise((resolve, reject) => { - login(username, password, code, uuid).then(res => { + login(nickname, password, code, uuid).then(res => { setToken(res.data.token) @@ -74,6 +78,7 @@ } // console.log(res) // alert(res.user.clanId) + commit('SET_USERID', res.user.userId) commit('SET_CLANID', res.user.clanId) commit('SET_NAME', user.userName) commit('SET_AVATAR', avatar) -- Gitblit v1.9.1