From f60c41f9ffc601e4e9d3eeff3ee43fe31d0b2921 Mon Sep 17 00:00:00 2001
From: zhouwx <1175765986@qq.com>
Date: 星期一, 17 十一月 2025 15:41:37 +0800
Subject: [PATCH] 修改
---
src/store/modules/user.js | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/store/modules/user.js b/src/store/modules/user.js
index 2f33a7d..80d0735 100644
--- a/src/store/modules/user.js
+++ b/src/store/modules/user.js
@@ -2,6 +2,7 @@
import { getToken, setToken, removeToken } from '@/utils/auth'
import defAva from '@/assets/images/profile.jpg'
import Cookies from "js-cookie";
+import { defineStore } from 'pinia'
import {getUserById} from "@/api/onlineEducation/user";
const useUserStore = defineStore(
'user',
@@ -10,6 +11,8 @@
token: getToken(),
id: '',
name: '',
+ companyId: null,
+ companyName: '',
avatar: '',
roles: [],
permissions: []
@@ -44,8 +47,10 @@
} else {
this.roles = ['ROLE_DEFAULT']
}
- this.id = user.userId
- this.name = user.userName
+ this.id = user.id
+ this.name = user.name
+ this.companyId = user.companyId
+ this.companyName = user.companyName
this.avatar = avatar
Cookies.set('userInfo',JSON.stringify(user))
resolve(res)
--
Gitblit v1.9.2