Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Education
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄奎
Education
Commits
55983cd2
Commit
55983cd2
authored
Dec 25, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
83376389
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
4 deletions
+22
-4
UserInfo.cs
Edu.Model/CacheModel/UserInfo.cs
+5
-0
RB_Menu.cs
Edu.Model/Entity/System/RB_Menu.cs
+5
-0
MenuModule.cs
Edu.Module.System/MenuModule.cs
+5
-2
LoginController.cs
Edu.WebApi/Controllers/User/LoginController.cs
+7
-2
No files found.
Edu.Model/CacheModel/UserInfo.cs
View file @
55983cd2
...
...
@@ -65,6 +65,11 @@ namespace Edu.Model.CacheModel
/// </summary>
public
List
<
MenuTree_ViewModel
>
MenuList
{
get
;
set
;
}
/// <summary>
/// 用中心菜单
/// </summary>
public
object
UserCenterList
{
get
;
set
;
}
/// <summary>
/// 集团Logo
/// </summary>
...
...
Edu.Model/Entity/System/RB_Menu.cs
View file @
55983cd2
...
...
@@ -60,5 +60,10 @@ namespace Edu.Model.Entity.System
/// 删除状态
/// </summary>
public
DateStateEnum
Status
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
int
IsUserCenter
{
get
;
set
;
}
}
}
Edu.Module.System/MenuModule.cs
View file @
55983cd2
...
...
@@ -86,6 +86,7 @@ namespace Edu.Module.System
{
nameof
(
RB_Menu_ViewModel
.
MenuType
),
model
.
MenuType
},
{
nameof
(
RB_Menu_ViewModel
.
SortNum
),
model
.
SortNum
},
{
nameof
(
RB_Menu_ViewModel
.
Status
),
model
.
Status
},
{
nameof
(
RB_Menu_ViewModel
.
IsUserCenter
),
model
.
IsUserCenter
},
};
flag
=
menuRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Menu_ViewModel
.
MenuId
),
model
.
MenuId
));
}
...
...
@@ -130,14 +131,16 @@ namespace Edu.Module.System
/// <param name="query"></param>
/// <param name="postIds"></param>
/// <returns></returns>
public
List
<
MenuTree_ViewModel
>
GetPostMenuTreeModule
(
RB_Menu_ViewModel
query
,
string
postIds
=
""
)
public
List
<
MenuTree_ViewModel
>
GetPostMenuTreeModule
(
RB_Menu_ViewModel
query
,
out
List
<
RB_Menu_ViewModel
>
userCenterList
,
string
postIds
=
""
)
{
List
<
RB_Menu_ViewModel
>
list
=
new
List
<
RB_Menu_ViewModel
>();
if
(!
string
.
IsNullOrEmpty
(
postIds
))
{
list
=
GetPostMenuListModule
(
postIds
,
query
.
MenuType
);
}
return
GetMenuTreeModule
(
list
);
userCenterList
=
list
.
Where
(
qitem
=>
qitem
.
MenuType
==
query
.
MenuType
&&
qitem
.
IsUserCenter
==
1
).
ToList
();
var
newList
=
list
.
Where
(
qitem
=>
qitem
.
MenuType
==
query
.
MenuType
&&
qitem
.
IsUserCenter
==
0
).
ToList
();
return
GetMenuTreeModule
(
newList
);
}
/// <summary>
...
...
Edu.WebApi/Controllers/User/LoginController.cs
View file @
55983cd2
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
Edu.Cache.User
;
using
Edu.Common.API
;
using
Edu.Common.Enum.User
;
using
Edu.Common.Plugin
;
using
Edu.Model.CacheModel
;
using
Edu.Model.ViewModel.System
;
using
Edu.Model.ViewModel.User
;
using
Edu.Module.Public
;
using
Edu.Module.System
;
...
...
@@ -93,10 +95,11 @@ namespace Edu.WebApi.Controllers.User
string
token
=
WebApiTokenHelper
.
CreateToken
(
Common
.
GlobalKey
.
JWT_User_Key
,
eduUserInfo
);
string
erpToken
=
WebApiTokenHelper
.
CreateToken
(
Common
.
GlobalKey
.
JWT_ERP_User_Key
,
erpUserInfo
);
var
treeList
=
menuModule
.
GetPostMenuTreeModule
(
new
Model
.
ViewModel
.
System
.
RB_Menu_ViewModel
()
{
MenuType
=
accountType
},
postIds
:
model
.
Post_Id
.
ToString
());
},
out
List
<
RB_Menu_ViewModel
>
userCenterList
,
postIds
:
model
.
Post_Id
.
ToString
());
//获取功能权限列表
var
actionList
=
menuModule
.
GetPostMenuFunctionListModule
(
model
.
Post_Id
.
ToString
());
//上传配置
...
...
@@ -113,6 +116,7 @@ namespace Edu.WebApi.Controllers.User
Token
=
token
,
ErpToken
=
erpToken
,
MenuList
=
treeList
,
UserCenterList
=
userCenterList
,
GroupLogo
=
model
.
GroupLogo
,
UserIcon
=
model
.
UserIcon
,
ApiRequestFromEnum
=
Common
.
Enum
.
ApiRequestFromEnum
.
WebAdmin
,
...
...
@@ -161,8 +165,9 @@ namespace Edu.WebApi.Controllers.User
var
treeList
=
menuModule
.
GetPostMenuTreeModule
(
new
Model
.
ViewModel
.
System
.
RB_Menu_ViewModel
()
{
MenuType
=
(
int
)
userInfo
.
AccountType
},
userInfo
.
PostId
.
ToString
());
},
out
List
<
RB_Menu_ViewModel
>
userCenterList
,
userInfo
.
PostId
.
ToString
());
userInfo
.
MenuList
=
treeList
;
userInfo
.
UserCenterList
=
userCenterList
;
//获取功能权限列表
var
actionList
=
menuModule
.
GetPostMenuFunctionListModule
(
userInfo
.
PostId
.
ToString
());
userInfo
.
ActionMenuList
=
actionList
?.
Select
(
qitem
=>
new
{
qitem
.
FunctionCode
,
qitem
.
FunctionName
,
qitem
.
MenuName
,
qitem
.
MenuUrl
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment