|
|
@ -1398,8 +1398,8 @@ function httpGet($url) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function getAccessToken() { |
|
|
function getAccessToken() { |
|
|
$appId = 'wxaee2df4a4b31df05'; |
|
|
$appId = 'wxe48c268ac1c97ab9'; |
|
|
$appSecret = '06284bac15b25775293690765a6be4d9'; |
|
|
$appSecret = 'fc355f42f55e693595d31e0e644bd11c'; |
|
|
$url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=$appId&secret=$appSecret"; |
|
|
$url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=$appId&secret=$appSecret"; |
|
|
$res = json_decode(httpGet($url)); |
|
|
$res = json_decode(httpGet($url)); |
|
|
$access_token = $res->access_token; |
|
|
$access_token = $res->access_token; |
|
|
@ -1415,16 +1415,15 @@ function sendMessage($touser,$template_id,$value) { |
|
|
$url = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=" .$accessToken; |
|
|
$url = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=" .$accessToken; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if($template_id == 'ogmlvTC-Q2gLMBbRHAUKCSWpwyQIOrLBA30HyAKkEXg'){ |
|
|
if($template_id == 'K5YS7UBbD18PZvqUmnBKfX_j8tKP_AUAKa75mwUsX0A'){ |
|
|
$data = [ |
|
|
$data = [ |
|
|
'touser' => $touser, |
|
|
'touser' => $touser, |
|
|
'template_id' => $template_id, |
|
|
'template_id' => $template_id, |
|
|
'data' => [ |
|
|
'data' => [ |
|
|
'thing3' => ['value' => $value['thing3'], 'color' => '#173177'], //课程名称 |
|
|
'thing9' => ['value' => $value['thing9'], 'color' => '#173177'], //课程名称 |
|
|
'time4' => ['value' => $value['time4'], 'color' => '#173177'],//课程周期 例子 2023年10月11日~2023年11月30日 |
|
|
'time8' => ['value' => $value['time8'], 'color' => '#173177'],//课程周期 例子 2023年10月11日~2023年11月30日 |
|
|
'character_string7' => ['value' => $value['character_string7'], 'color' => '#173177'],//课程数量 |
|
|
'number4' => ['value' => $value['number4'], 'color' => '#173177'],//课程数量 |
|
|
'character_string9' => ['value' => $value['character_string9'], 'color' => '#173177'],//课程码 课程金额 |
|
|
'amount5' => ['value' => $value['amount5'], 'color' => '#173177']//课程码 课程金额 |
|
|
'time5' => ['value' => $value['time5'], 'color' => '#173177']//上课时间 |
|
|
|
|
|
], |
|
|
], |
|
|
'miniprogram' => [ |
|
|
'miniprogram' => [ |
|
|
"appid" => "wxaee2df4a4b31df05", |
|
|
"appid" => "wxaee2df4a4b31df05", |
|
|
@ -1434,13 +1433,13 @@ function sendMessage($touser,$template_id,$value) { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if($template_id == 'SWODTQvQPaucMnDrszdYSy5wg5_24FIlyXZqxwbjRT8'){ |
|
|
if($template_id == 'FrAKIn9zs0qdxWFW1R9vnR2WDJgil2KCg-9cLFaHFWM'){ |
|
|
$data = [ |
|
|
$data = [ |
|
|
'touser' => $touser, |
|
|
'touser' => $touser, |
|
|
'template_id' => $template_id, |
|
|
'template_id' => $template_id, |
|
|
'data' => [ |
|
|
'data' => [ |
|
|
'thing4' => ['value' => $value['thing4'], 'color' => '#173177'], |
|
|
'thing5' => ['value' => $value['thing5'], 'color' => '#173177'], |
|
|
'thing6' => ['value' => $value['thing6'], 'color' => '#173177'] |
|
|
'thing19' => ['value' => $value['thing19'], 'color' => '#173177'] |
|
|
], |
|
|
], |
|
|
'miniprogram' => [ |
|
|
'miniprogram' => [ |
|
|
"appid" => "wxaee2df4a4b31df05", |
|
|
"appid" => "wxaee2df4a4b31df05", |
|
|
|