refactor(user): 重构用户信息获

This commit is contained in:
rd
2025-09-19 09:40:06 +08:00
parent 55b4ed1e83
commit 192a125d01
6 changed files with 21 additions and 12 deletions

View File

@ -1,5 +1,5 @@
import { defineStore } from 'pinia';
import { fetchProfileInfo } from '@/api/all/login';
import { fetchUserInfo } from '@/api/all/login';
// import { useSidebarStore } from '@/stores/modules/side-bar';
import { glsWithCatch, rlsWithCatch, slsWithCatch } from '@/utils/stroage';
import { useEnterpriseStore } from '@/stores/modules/enterprise';
@ -72,7 +72,7 @@ export const useUserStore = defineStore('user', {
async getUserInfo() {
const enterpriseStore = useEnterpriseStore();
const { code, data } = await fetchProfileInfo();
const { code, data } = await fetchUserInfo();
if (code === 200) {
this.setUserInfo(data);