@@ -77,3 +77,34 @@ appkey | |||||
第三步:获取useraccount并实现系统登录逻辑 | 第三步:获取useraccount并实现系统登录逻辑 | ||||
使用获取到的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" | |||||
} | |||||
} | |||||
@@ -84,9 +84,9 @@ ip | |||||
第三方系统使用解密的明文结合系统登录逻辑进行登录验证并跳转到系统业务界面,本次对接结束。(上表参数t根据各自业务需要可使用可不使用) | 第三方系统使用解密的明文结合系统登录逻辑进行登录验证并跳转到系统业务界面,本次对接结束。(上表参数t根据各自业务需要可使用可不使用) | ||||
H5版本对接方式与上述PC版本一致,如下图: | |||||
点击【统一应用】进入应用列表,再点击【相对应的对接系统】系统会跳转到第一步配置的【登录接口地址】并发送标准Http Get请求,随后实现上述【实现解密】部分,第三方系统使用解密的明文结合系统登录逻辑进行登录验证并跳转到系统业务界面,本次对接结束。(上表参数t根据各自业务需要可使用可不使用) | |||||
@@ -35,10 +35,14 @@ | |||||
<div class="lr-form-item-title">是否启用<font face="宋体">*</font></div> | <div class="lr-form-item-title">是否启用<font face="宋体">*</font></div> | ||||
<div id="FEnabled" isvalid="yes" checkexpession="NotNull"></div> | <div id="FEnabled" isvalid="yes" checkexpession="NotNull"></div> | ||||
</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 class="lr-form-item-title">是否管理页<font face="宋体">*</font></div> | ||||
<div id="FIsManagePage" isvalid="yes" checkexpession="NotNull"></div> | <div id="FIsManagePage" isvalid="yes" checkexpession="NotNull"></div> | ||||
</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="col-xs-12 lr-form-item" data-table="Perm_Function"> | ||||
<div class="lr-form-item-title">图片<font face="宋体">*</font></div> | <div class="lr-form-item-title">图片<font face="宋体">*</font></div> | ||||
<div id="FImage" isvalid="yes" checkexpession="NotNull" ></div> | <div id="FImage" isvalid="yes" checkexpession="NotNull" ></div> | ||||
@@ -30,6 +30,7 @@ var bootstrap = function ($, learun) { | |||||
} | } | ||||
$('#FEnabled').lrDataItemSelect({ code: 'YesOrNoBit' }); | $('#FEnabled').lrDataItemSelect({ code: 'YesOrNoBit' }); | ||||
$('#FIsManagePage').lrDataItemSelect({ code: 'YesOrNoBit' }); | $('#FIsManagePage').lrDataItemSelect({ code: 'YesOrNoBit' }); | ||||
$('#FIsH5').lrDataItemSelect({ code: 'YesOrNoBit' }); | |||||
$('#FImage').lrUploader(); | $('#FImage').lrUploader(); | ||||
}, | }, | ||||
initData: function () { | initData: function () { | ||||
@@ -97,6 +97,7 @@ var bootstrap = function ($, learun) { | |||||
param = param || {}; | param = param || {}; | ||||
param.FTId = FTId; | param.FTId = FTId; | ||||
param.UserId = UserId; | param.UserId = UserId; | ||||
param.FIsH5 = 0; | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | ||||
} | } | ||||
}; | }; | ||||
@@ -69,7 +69,7 @@ namespace Learun.Application.Web.Controllers | |||||
public ActionResult SSOApplication() | public ActionResult SSOApplication() | ||||
{ | { | ||||
var userinfo = LoginUserInfo.Get(); | 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(); | return View(); | ||||
} | } | ||||
/// <summary> | /// <summary> | ||||
@@ -267,7 +267,7 @@ namespace Learun.Application.WebApi.Modules | |||||
public Response GetList20(dynamic _) | public Response GetList20(dynamic _) | ||||
{ | { | ||||
var userinfo = userInfo; | 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 | new | ||||
{ | { | ||||
m.FName, | m.FName, | ||||
@@ -289,7 +289,7 @@ namespace Learun.Application.WebApi.Modules | |||||
var datatype = perm_FunctionTypeIBLL.GetListByUserId(userInfo.userId); | var datatype = perm_FunctionTypeIBLL.GetListByUserId(userInfo.userId); | ||||
foreach (var typeEntity in datatype) | 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) | foreach (var item in datafunction) | ||||
{ | { | ||||
if (item.FIsManagePage == true) | if (item.FIsManagePage == true) | ||||
@@ -62,6 +62,11 @@ namespace Learun.Application.TwoDevelopment.Permission | |||||
[Column("FISMANAGEPAGE")] | [Column("FISMANAGEPAGE")] | ||||
public bool? FIsManagePage { get; set; } | public bool? FIsManagePage { get; set; } | ||||
/// <summary> | /// <summary> | ||||
/// 是否手机端 | |||||
/// </summary> | |||||
[Column("FISH5")] | |||||
public bool? FIsH5 { get; set; } | |||||
/// <summary> | |||||
/// FEnabled | /// FEnabled | ||||
/// </summary> | /// </summary> | ||||
[Column("FENABLED")] | [Column("FENABLED")] | ||||
@@ -67,6 +67,11 @@ namespace Learun.Application.TwoDevelopment.Permission | |||||
dp.Add("FTId", "" + queryParam["FTId"].ToString() + "", DbType.String); | dp.Add("FTId", "" + queryParam["FTId"].ToString() + "", DbType.String); | ||||
strSql.Append(" AND t.FTId=@FTId "); | 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); | return this.BaseRepository().FindList<Perm_FunctionEntity>(strSql.ToString(), dp, pagination); | ||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||