From 9fa19968f04de83a13041194b18f6aa2e0c38660 Mon Sep 17 00:00:00 2001 From: qx <1084500556@qq.com> Date: 星期二, 11 二月 2025 13:49:21 +0800 Subject: [PATCH] qx --- src/store/modules/user.js | 15 +++++++++++---- 1 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 4c23e5e..73dcdb6 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -7,7 +7,8 @@ name: '', avatar: '', roles: [], - permissions: [] + permissions: [], + // routeId: null }, mutations: { @@ -25,7 +26,10 @@ }, SET_PERMISSIONS: (state, permissions) => { state.permissions = permissions - } + }, + // SET_ROUTE_ID(state, id) { + // state.routeId = id; + // } }, actions: { @@ -37,9 +41,10 @@ const uuid = userInfo.uuid const type = userInfo.type const mobile = userInfo.mobile + const hospId = userInfo.hospId return new Promise((resolve, reject) => { if(userInfo.username.length === 12){ - getlogin(username, password, code, uuid,type,mobile).then(res => { + getlogin(username, password, code, uuid,type,mobile,hospId).then(res => { setToken(res.token) commit('SET_TOKEN', res.token); resolve(res) @@ -47,9 +52,10 @@ reject(error) }) }else{ - login(username, password, code, uuid,type,mobile).then(res => { + login(username, password, code, uuid,type,mobile,hospId).then(res => { setToken(res.token) commit('SET_TOKEN', res.token) + // commit('SET_ROUTE_ID', hospId) resolve(res) }).catch(error => { reject(error) @@ -87,6 +93,7 @@ commit('SET_TOKEN', '') commit('SET_ROLES', []) commit('SET_PERMISSIONS', []) + // commit('SET_ROUTE_ID', []) removeToken() resolve() }).catch(error => { -- Gitblit v1.8.0