From f106cd80d14b83c484b6a1147b5bc9772d15b4f8 Mon Sep 17 00:00:00 2001
From: zhangxiao <898441624@qq.com>
Date: 星期三, 07 八月 2024 19:29:31 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.5.5:10010/r/web/flow_web
---
src/store/modules/user/index.ts | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/src/store/modules/user/index.ts b/src/store/modules/user/index.ts
index 0849edf..0a3e0d3 100644
--- a/src/store/modules/user/index.ts
+++ b/src/store/modules/user/index.ts
@@ -10,6 +10,7 @@
import { UserState } from './types';
import useAppStore from '../app';
+
const useUserStore = defineStore('user', {
state: (): UserState => ({
name: undefined,
@@ -63,7 +64,7 @@
},
// Login
- async login(loginForm: LoginData) {
+ async login(loginForm: LoginData):string {
try {
const res = await userLogin(loginForm);
setToken(res.data.access_token);
@@ -75,6 +76,11 @@
this.resources=res.data.resources;
setUserInfo(JSON.stringify(userInfo));
setUserResources(JSON.stringify(this.resources))
+ for (const r of this.resources) {
+ if (r.menuType == 0) {
+ return r.component
+ }
+ }
} catch (err) {
clearToken();
throw err;
--
Gitblit v1.8.0