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