Browse Source

调整代码格式

develop
胡超1 2 years ago
parent
commit
0594697a81
  1. 2
      24Hour/Controllers/Common/LawyerArchivesController.cs
  2. 2
      24Hour/Controllers/LoginController.cs
  3. 14
      24Hour/WechatMessagerClient.cs

2
24Hour/Controllers/Common/LawyerArchivesController.cs

@ -131,7 +131,7 @@ namespace _24Hour.Controllers.Common
lawyer.departmentUnifiedSocialCreditCode = sccCode;
var num = await _db.Updateable(lawyer).UpdateColumns(x => x.departmentUnifiedSocialCreditCode).ExecuteCommandAsync();
if (num>0)
if (num > 0)
{
return Result.Success("更新成功");
}

2
24Hour/Controllers/LoginController.cs

@ -410,7 +410,6 @@ namespace _24Hour.Controllers
}
else
{
ret.IsSucceed = false;
ret.Message = "微信未授权,请先注册账号!";
}
@ -664,7 +663,6 @@ namespace _24Hour.Controllers
ret.Message = $"用户未授权无法登录,请联系管理员!";
return ret;
}
}
return ret;
}

14
24Hour/WechatMessagerClient.cs

@ -44,10 +44,6 @@ namespace _24Hour
appid = $"{configuration.GetSection("Wechat:appid").Value}";
secret = $"{configuration.GetSection("Wechat:secret").Value}";
secid = $"{configuration.GetSection("Wechat:secid").Value}";
logger.LogInformation($"appid {appid}");
logger.LogInformation($"secret {secret}");
logger.LogInformation($"secid {secid}");
}
public async Task<Result> GetOpenId(string code)
{
@ -116,7 +112,7 @@ namespace _24Hour
msg = new
{
touser = useropenId,
template_id = "mRfzPnc_3JuV9cPhjKrRL3jX1C_JJoBGYtqEnbfadRM",
template_id = "XgrMTq1gwDfMJI6vN0jsSEv3xGy7v3amh0JMWj4SnAY",
page = "pages/selfService/reception/reception",
miniprogram_state = $"{_configuration.GetSection("Wechat:miniprogram_state").Value}",
lang = "zh_CN",
@ -129,7 +125,9 @@ namespace _24Hour
thing5 = new { value = $"{thing5}", color = "#173177" },//
},
};
logger.LogInformation($"发送审核成功通知 参数{msg.ConvertToJsonStr()} url {url}");
var re = HttpHelper.Post(posturl, msg);
logger.LogInformation($"发送审核成功通知 结果:{re}");
if (re.Jsonstr("errcode") == "0")
return true;
return false;
@ -161,7 +159,7 @@ namespace _24Hour
if (string.IsNullOrEmpty(token))
{
string geturl = $"https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=wx48108a0c98a3dab0&secret=e752e4fba67526eca21313a18c96a58f";
string geturl = $"https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid={appid}&secret={secid}";
var re1 = HttpHelper.Get(geturl);
if (re1.Jsonstr("errcode") == null)
{
@ -187,7 +185,7 @@ namespace _24Hour
msg = new
{
touser = useropenId,
template_id = "sPbZd6ro14L4uCR_TyDlB_nKKBq-iSvVBlOCmtTDDt0",
template_id = "bfA-t5EN4pkQzAOS17SRPRKvmMteaJt0kw3YKIcovIQ",
page = "pages/selfService/reception/reception",
miniprogram_state = $"{_configuration.GetSection("Wechat:miniprogram_state").Value}",
lang = "zh_CN",
@ -200,7 +198,9 @@ namespace _24Hour
thing5 = new { value = $"{thing5}" },//事由
},
};
logger.LogInformation($"发送审核成功通知 参数{msg.ConvertToJsonStr()} url {url}");
var re = HttpHelper.Post(posturl, msg);
logger.LogInformation($"发送审核通知 结果:{re}");
if (re.Jsonstr("errcode") == "0")
return true;
return false;

Loading…
Cancel
Save