mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2026-02-18 22:26:23 +08:00
ru
This commit is contained in:
@@ -34,13 +34,13 @@ namespace OpenAuth.Mvc.Controllers
|
||||
foreach (var element in CurrentModule.Elements)
|
||||
{
|
||||
sb.Append("<button "
|
||||
+ " id='" + element.DomId + "' "
|
||||
+ " class='btn btn-sm " + element.Class + "' "
|
||||
+ " onclick='" + element.Script + "' " + element.Attr
|
||||
+ " data-type='" + element.DomId + "' "
|
||||
+ " class='layui-btn " + element.Class + "' "
|
||||
+ element.Attr
|
||||
+ ">");
|
||||
if (!string.IsNullOrEmpty(element.Icon))
|
||||
{
|
||||
sb.Append("<i class='ace-icon fa fa-" + element.Icon + "'></i>");
|
||||
sb.Append("<i class='layui-icon'>" + element.Icon + "</i>");
|
||||
}
|
||||
sb.Append(element.Name + "</button>");
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace OpenAuth.Mvc.Controllers
|
||||
}
|
||||
else
|
||||
{
|
||||
resp.Message = "登陆失败";
|
||||
resp.Message = "登录失败";
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
@@ -43,7 +43,7 @@ namespace OpenAuth.Mvc.Controllers
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 开发者登陆
|
||||
/// 开发者登录
|
||||
/// </summary>
|
||||
public ActionResult LoginByDev()
|
||||
{
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Web.Http;
|
||||
using System.Web.Mvc;
|
||||
using Infrastructure;
|
||||
using OpenAuth.App;
|
||||
using OpenAuth.App.Request;
|
||||
using OpenAuth.App.ViewModel;
|
||||
using OpenAuth.Mvc.Models;
|
||||
|
||||
@@ -21,7 +23,7 @@ namespace OpenAuth.Mvc.Controllers
|
||||
}
|
||||
|
||||
//添加或修改组织
|
||||
[HttpPost]
|
||||
[System.Web.Mvc.HttpPost]
|
||||
public string AddOrUpdate(UserView view)
|
||||
{
|
||||
try
|
||||
@@ -40,12 +42,12 @@ namespace OpenAuth.Mvc.Controllers
|
||||
/// <summary>
|
||||
/// 加载组织下面的所有用户
|
||||
/// </summary>
|
||||
public string Load(string orgId, int page = 1, int limit = 30)
|
||||
public string Load([FromUri]QueryUserListReq request)
|
||||
{
|
||||
return JsonHelper.Instance.Serialize(App.Load(orgId, page, limit));
|
||||
return JsonHelper.Instance.Serialize(App.Load(request));
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[System.Web.Mvc.HttpPost]
|
||||
public string Delete(string[] ids)
|
||||
{
|
||||
try
|
||||
@@ -69,7 +71,7 @@ namespace OpenAuth.Mvc.Controllers
|
||||
/// </summary>
|
||||
public string GetAccessedUsers()
|
||||
{
|
||||
IEnumerable<UserView> users = App.Load(string.Empty, 1, 10).data;
|
||||
IEnumerable<UserView> users = App.Load(new QueryUserListReq()).data;
|
||||
var result = new Dictionary<string , object>();
|
||||
foreach (var user in users)
|
||||
{
|
||||
@@ -77,14 +79,14 @@ namespace OpenAuth.Mvc.Controllers
|
||||
{
|
||||
Account = user.Account,
|
||||
RealName = user.Name,
|
||||
id = user.Id.ToString(),
|
||||
id = user.Id,
|
||||
text = user.Name,
|
||||
value = user.Account,
|
||||
parentId = "0",
|
||||
showcheck = true,
|
||||
img = "fa fa-user",
|
||||
};
|
||||
result.Add(user.Id.ToString(), item);
|
||||
result.Add(user.Id, item);
|
||||
}
|
||||
|
||||
return JsonHelper.Instance.Serialize(result);
|
||||
|
||||
@@ -7,13 +7,13 @@ using OpenAuth.App.ViewModel;
|
||||
namespace OpenAuth.Mvc.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取登陆用户的全部信息
|
||||
/// 获取登录用户的全部信息
|
||||
/// </summary>
|
||||
public class UserSessionController : BaseController
|
||||
{
|
||||
UserWithAccessedCtrls user = AuthUtil.GetCurrentUser();
|
||||
/// <summary>
|
||||
/// 获取登陆用户可访问的所有模块,及模块的操作菜单
|
||||
/// 获取登录用户可访问的所有模块,及模块的操作菜单
|
||||
/// </summary>
|
||||
public string GetModulesTree()
|
||||
{
|
||||
@@ -22,7 +22,7 @@ namespace OpenAuth.Mvc.Controllers
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取登陆用户可访问的所有部门
|
||||
/// 获取登录用户可访问的所有部门
|
||||
/// </summary>
|
||||
public string GetOrgs()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user