Commit f3500547 authored by 黄奎's avatar 黄奎

页面修改

parent 5ea75dbf
using Edu.Model.ViewModel.System; using Edu.Common.Enum.User;
using Edu.Model.ViewModel.System;
using System.Collections.Generic; using System.Collections.Generic;
namespace Edu.Model.CacheModel namespace Edu.Model.CacheModel
...@@ -28,6 +29,11 @@ namespace Edu.Model.CacheModel ...@@ -28,6 +29,11 @@ namespace Edu.Model.CacheModel
/// </summary> /// </summary>
public string AccountName { get; set; } public string AccountName { get; set; }
/// <summary>
/// 账号类型(1-管理端,2,-教师端,3-助教,4-学生)
/// </summary>
public AccountTypeEnum AccountType { get; set; }
/// <summary> /// <summary>
/// 学校名称 /// 学校名称
/// </summary> /// </summary>
......
...@@ -81,6 +81,7 @@ namespace Edu.WebApi.Controllers.User ...@@ -81,6 +81,7 @@ namespace Edu.WebApi.Controllers.User
UserInfo obj = new UserInfo UserInfo obj = new UserInfo
{ {
Id = model.Id, Id = model.Id,
AccountType=model.AccountType,
Group_Id = model.Group_Id, Group_Id = model.Group_Id,
School_Id = model.School_Id, School_Id = model.School_Id,
AccountName = model.AccountName, AccountName = model.AccountName,
...@@ -115,8 +116,16 @@ namespace Edu.WebApi.Controllers.User ...@@ -115,8 +116,16 @@ namespace Edu.WebApi.Controllers.User
} }
if (Uid > 0) if (Uid > 0)
{ {
object obj = UserReidsCache.GetUserLoginInfo(Uid); UserInfo userInfo = UserReidsCache.GetUserLoginInfo(Uid);
return ApiResult.Success(data: obj); if (userInfo != null)
{
var treeList = menuModule.GetTreeMenuModule(new Model.ViewModel.System.RB_Menu_ViewModel()
{
MenuType =(int) userInfo.AccountType
});
userInfo.MenuList = treeList;
}
return ApiResult.Success(data: userInfo);
} }
else else
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment