From 324db843282ae84085e52a7e8ad03d01a6fb52cc Mon Sep 17 00:00:00 2001
From: liudong <liudong>
Date: 星期四, 08 八月 2024 11:51:51 +0800
Subject: [PATCH] 配置上传图片bug页面修改

---
 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