Commit f878a550 authored by 黄奎's avatar 黄奎

页面修改

parent fd85c417
......@@ -1539,17 +1539,23 @@ namespace Edu.WebApi.Controllers.QYWeChat
public ApiResult SetUserAutoLogin()
{
var referer = Request.Headers["Origin"].ToString().Replace("http://", "");
Common.Plugin.LogHelper.WriteInfo("referer::" + referer);
if (!string.IsNullOrEmpty(referer))
{
var group = groupModule.GetGroupEntityModule(referer);
Common.Plugin.LogHelper.WriteInfo("group::" + Common.Plugin.JsonHelper.Serialize(group));
if (group.GId != 0)
{
var query = JObject.Parse(RequestParm.Msg.ToString());
Common.Plugin.LogHelper.WriteInfo("query::" + Common.Plugin.JsonHelper.Serialize(query));
var mark = query.GetStringValue("mark");
var config = Cache.WeChat.WeChatReidsCache.GetAppConfig(group.GId, mark);
Common.Plugin.LogHelper.WriteInfo("config::" + Common.Plugin.JsonHelper.Serialize(config));
var token = QYWeiXinHelper.GetToken(config?.CropId ?? "", config?.Secret ?? "", false);
Common.Plugin.LogHelper.WriteInfo("token::" + token);
var path = new QYWeiXinHelper().GetUserAuthorizationCodePath(mark, config?.CropId ?? "", config?.AppId ?? "", token);
Common.Plugin.LogHelper.WriteInfo("path::" + path);
if (!string.IsNullOrEmpty(path))
{
HttpHelper.HttpGet(path);
......
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