角色列表接口完成

This commit is contained in:
2026-08-18 15:54:56 +08:00
parent bf355b3fbf
commit b8571da035
4 changed files with 37 additions and 20 deletions
+2 -1
View File
@@ -22,7 +22,7 @@ export const useAuthStore = defineStore(SetupStoreId.Auth, () => {
const userInfo: Api.Auth.UserInfo = reactive({
userId: '',
username: '',
userName: '',
roles: [],
buttons: []
});
@@ -130,6 +130,7 @@ export const useAuthStore = defineStore(SetupStoreId.Auth, () => {
async function loginByToken(loginToken: Api.Auth.LoginToken) {
// 1. stored in the localStorage, the later requests need it in headers
localStg.set('token', loginToken.token);
localStg.set('refreshToken', loginToken.refreshToken);
// 2. get user info
const pass = await getUserInfo();