|
|
@@ -108,6 +108,16 @@ namespace Learun.Application.WebApi.Modules |
|
|
|
|
|
|
|
string code = Request.Query["code"]; |
|
|
|
var responsejson = HttpGet("https://api.weixin.qq.com/sns/oauth2/access_token?appid=" + appid + "&secret=" + secret + "&code=" + code + "&grant_type=authorization_code"); |
|
|
|
LogEntity logEntity = new LogEntity(); |
|
|
|
logEntity.F_CategoryId = 1234; |
|
|
|
logEntity.F_OperateTypeId = ((int)OperationType.Visit).ToString(); |
|
|
|
logEntity.F_OperateType = EnumAttribute.GetDescription(OperationType.Visit); |
|
|
|
logEntity.F_OperateAccount = "wxlogin:access_token"; |
|
|
|
logEntity.F_OperateUserId = "wxlogin:access_token"; |
|
|
|
logEntity.F_Module = "wxlogin:access_token"; |
|
|
|
logEntity.F_Description = "wxlogin:access_token"; |
|
|
|
logEntity.F_SourceContentJson = responsejson; |
|
|
|
logEntity.WriteLog(); |
|
|
|
if (!string.IsNullOrEmpty(responsejson)) |
|
|
|
{ |
|
|
|
var weixintokenobj = JsonConvert.DeserializeObject<dynamic>(responsejson); |
|
|
@@ -120,7 +130,7 @@ namespace Learun.Application.WebApi.Modules |
|
|
|
ReqParameter req = this.Bind<ReqParameter>(); |
|
|
|
string token = OperatorHelper.Instance.AddLoginUser(userEntity.F_Account, "Learun_ADMS_6.1_App", req.loginMark, false);//写入缓存信息 |
|
|
|
#region 写入日志 |
|
|
|
LogEntity logEntity = new LogEntity(); |
|
|
|
logEntity = new LogEntity(); |
|
|
|
logEntity.F_CategoryId = 1; |
|
|
|
logEntity.F_OperateTypeId = ((int)OperationType.Login).ToString(); |
|
|
|
logEntity.F_OperateType = EnumAttribute.GetDescription(OperationType.Login); |
|
|
|