Browse Source

统一应用管理PC与H5分离

新疆体育高职分支
liangkun 1 year ago
parent
commit
83171023d7
9 changed files with 53 additions and 6 deletions
  1. +31
    -0
      Learun.Framework.Ultimate V7/Doc文档/数字化智慧校园统一身份认证oauth2.0对接说明V1.0.docx
  2. +2
    -2
      Learun.Framework.Ultimate V7/Doc文档/数字化智慧校园统一身份认证对接说明V1.0.docx
  3. +5
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/Perm_Function/Form.cshtml
  4. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/Perm_Function/Form.js
  5. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/Perm_Function/TeacherIndex.js
  6. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs
  7. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/SSOApi.cs
  8. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Permission/Perm_Function/Perm_FunctionEntity.cs
  9. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Permission/Perm_Function/Perm_FunctionService.cs

+ 31
- 0
Learun.Framework.Ultimate V7/Doc文档/数字化智慧校园统一身份认证oauth2.0对接说明V1.0.docx View File

@@ -77,3 +77,34 @@ appkey

第三步:获取useraccount并实现系统登录逻辑
使用获取到的useraccount数据进行接入方系统认证操作。


H5版本对接方式与上述PC版本一致,如下图:

点击【统一应用2.0】进入应用列表,再点击【相对应的对接系统】系统会根据各系统在【应用配置】功能中填写的【登录接口地址】重定向到【登录接口地址】并携带参数appkey,对接方需要获取appkey,并发送请求到授权接口换取当前登录用户信息。

授权接口采用标准Http Get请求方式,appkey有效期为10分钟
请求地址:http:// 数字化智慧校园API部署地址/quanjiang/sso/authorize?appid=APPID&secret=SECRET&appkey=APPKEY
参数说明
参数
是否必须
说明
appid
应用唯一标识
secret
密钥
appkey
统一认证平台重定向携带的appkey参数值

返回成功结果示例:
{
"code": 200,
"info": "响应成功",
"data": {
"useraccount": "user01"
}
}



+ 2
- 2
Learun.Framework.Ultimate V7/Doc文档/数字化智慧校园统一身份认证对接说明V1.0.docx View File

@@ -84,9 +84,9 @@ ip

第三方系统使用解密的明文结合系统登录逻辑进行登录验证并跳转到系统业务界面,本次对接结束。(上表参数t根据各自业务需要可使用可不使用)

H5版本对接方式与上述PC版本一致,如下图:



点击【统一应用】进入应用列表,再点击【相对应的对接系统】系统会跳转到第一步配置的【登录接口地址】并发送标准Http Get请求,随后实现上述【实现解密】部分,第三方系统使用解密的明文结合系统登录逻辑进行登录验证并跳转到系统业务界面,本次对接结束。(上表参数t根据各自业务需要可使用可不使用)





+ 5
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/Perm_Function/Form.cshtml View File

@@ -35,10 +35,14 @@
<div class="lr-form-item-title">是否启用<font face="宋体">*</font></div>
<div id="FEnabled" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="Perm_Function">
<div class="col-xs-6 lr-form-item" data-table="Perm_Function">
<div class="lr-form-item-title">是否管理页<font face="宋体">*</font></div>
<div id="FIsManagePage" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="Perm_Function">
<div class="lr-form-item-title">是否手机端<font face="宋体">*</font></div>
<div id="FIsH5" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="Perm_Function">
<div class="lr-form-item-title">图片<font face="宋体">*</font></div>
<div id="FImage" isvalid="yes" checkexpession="NotNull" ></div>


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/Perm_Function/Form.js View File

@@ -30,6 +30,7 @@ var bootstrap = function ($, learun) {
}
$('#FEnabled').lrDataItemSelect({ code: 'YesOrNoBit' });
$('#FIsManagePage').lrDataItemSelect({ code: 'YesOrNoBit' });
$('#FIsH5').lrDataItemSelect({ code: 'YesOrNoBit' });
$('#FImage').lrUploader();
},
initData: function () {


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/Perm_Function/TeacherIndex.js View File

@@ -97,6 +97,7 @@ var bootstrap = function ($, learun) {
param = param || {};
param.FTId = FTId;
param.UserId = UserId;
param.FIsH5 = 0;
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs View File

@@ -69,7 +69,7 @@ namespace Learun.Application.Web.Controllers
public ActionResult SSOApplication()
{
var userinfo = LoginUserInfo.Get();
ViewBag.FunctionList = perm_FunctionIBLL.GetListByUserId(userinfo.userId);
ViewBag.FunctionList = perm_FunctionIBLL.GetListByUserId(userinfo.userId).Where(m=>m.FIsH5==false);
return View();
}
/// <summary>


+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/SSOApi.cs View File

@@ -267,7 +267,7 @@ namespace Learun.Application.WebApi.Modules
public Response GetList20(dynamic _)
{
var userinfo = userInfo;
var functionlist = perm_FunctionIBLL.GetListByUserId(userinfo.userId).Select(m=>
var functionlist = perm_FunctionIBLL.GetListByUserId(userinfo.userId).Where(m=>m.FIsH5==true).Select(m=>
new
{
m.FName,
@@ -289,7 +289,7 @@ namespace Learun.Application.WebApi.Modules
var datatype = perm_FunctionTypeIBLL.GetListByUserId(userInfo.userId);
foreach (var typeEntity in datatype)
{
var datafunction = perm_FunctionIBLL.GetListByFTId(typeEntity.FTId, userInfo.userId);
var datafunction = perm_FunctionIBLL.GetListByFTId(typeEntity.FTId, userInfo.userId).Where(m=>m.FIsH5==true);
foreach (var item in datafunction)
{
if (item.FIsManagePage == true)


+ 5
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Permission/Perm_Function/Perm_FunctionEntity.cs View File

@@ -62,6 +62,11 @@ namespace Learun.Application.TwoDevelopment.Permission
[Column("FISMANAGEPAGE")]
public bool? FIsManagePage { get; set; }
/// <summary>
/// 是否手机端
/// </summary>
[Column("FISH5")]
public bool? FIsH5 { get; set; }
/// <summary>
/// FEnabled
/// </summary>
[Column("FENABLED")]


+ 5
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Permission/Perm_Function/Perm_FunctionService.cs View File

@@ -67,6 +67,11 @@ namespace Learun.Application.TwoDevelopment.Permission
dp.Add("FTId", "" + queryParam["FTId"].ToString() + "", DbType.String);
strSql.Append(" AND t.FTId=@FTId ");
}
if (!queryParam["FIsH5"].IsEmpty())
{
dp.Add("FIsH5", "" + queryParam["FIsH5"].ToString() + "", DbType.Int32);
strSql.Append(" AND t.FIsH5=@FIsH5 ");
}
return this.BaseRepository().FindList<Perm_FunctionEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)


Loading…
Cancel
Save