From 3d50d51668f30b3f9b4c245bcd0532b6c8c5ebea Mon Sep 17 00:00:00 2001 From: "1213317725@qq.com" <1213317725@qq.com> Date: Thu, 31 Jul 2025 17:56:20 +0800 Subject: [PATCH] 1 --- niucloud/app/api/controller/login/Login.php | 4 ++-- niucloud/app/common.php | 21 ++++++++++----------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/niucloud/app/api/controller/login/Login.php b/niucloud/app/api/controller/login/Login.php index c97966bb..8d91c4b6 100644 --- a/niucloud/app/api/controller/login/Login.php +++ b/niucloud/app/api/controller/login/Login.php @@ -154,8 +154,8 @@ class Login extends BaseController $v['wx_openid'], $template_id, [ - 'thing4' => $v['course_name'].',您有一节课程还有不到24小时就要开始了,如需请假请提前6小时发起请假操作。', - 'thing6' => $v['course_date'].' '.$v['time_slot'], + 'thing5' => $v['course_name'].',您有一节课程还有不到24小时就要开始了,如需请假请提前6小时发起请假操作。', + 'thing19' => $v['course_date'].' '.$v['time_slot'], 'pagepath' => '' ] ); diff --git a/niucloud/app/common.php b/niucloud/app/common.php index a3f1300a..9e7307a3 100644 --- a/niucloud/app/common.php +++ b/niucloud/app/common.php @@ -1398,8 +1398,8 @@ function httpGet($url) { function getAccessToken() { - $appId = 'wxaee2df4a4b31df05'; - $appSecret = '06284bac15b25775293690765a6be4d9'; + $appId = 'wxe48c268ac1c97ab9'; + $appSecret = 'fc355f42f55e693595d31e0e644bd11c'; $url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=$appId&secret=$appSecret"; $res = json_decode(httpGet($url)); $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; - if($template_id == 'ogmlvTC-Q2gLMBbRHAUKCSWpwyQIOrLBA30HyAKkEXg'){ + if($template_id == 'K5YS7UBbD18PZvqUmnBKfX_j8tKP_AUAKa75mwUsX0A'){ $data = [ 'touser' => $touser, 'template_id' => $template_id, 'data' => [ - 'thing3' => ['value' => $value['thing3'], 'color' => '#173177'], //课程名称 - 'time4' => ['value' => $value['time4'], 'color' => '#173177'],//课程周期 例子 2023年10月11日~2023年11月30日 - 'character_string7' => ['value' => $value['character_string7'], 'color' => '#173177'],//课程数量 - 'character_string9' => ['value' => $value['character_string9'], 'color' => '#173177'],//课程码 课程金额 - 'time5' => ['value' => $value['time5'], 'color' => '#173177']//上课时间 + 'thing9' => ['value' => $value['thing9'], 'color' => '#173177'], //课程名称 + 'time8' => ['value' => $value['time8'], 'color' => '#173177'],//课程周期 例子 2023年10月11日~2023年11月30日 + 'number4' => ['value' => $value['number4'], 'color' => '#173177'],//课程数量 + 'amount5' => ['value' => $value['amount5'], 'color' => '#173177']//课程码 课程金额 ], 'miniprogram' => [ "appid" => "wxaee2df4a4b31df05", @@ -1434,13 +1433,13 @@ function sendMessage($touser,$template_id,$value) { } - if($template_id == 'SWODTQvQPaucMnDrszdYSy5wg5_24FIlyXZqxwbjRT8'){ + if($template_id == 'FrAKIn9zs0qdxWFW1R9vnR2WDJgil2KCg-9cLFaHFWM'){ $data = [ 'touser' => $touser, 'template_id' => $template_id, 'data' => [ - 'thing4' => ['value' => $value['thing4'], 'color' => '#173177'], - 'thing6' => ['value' => $value['thing6'], 'color' => '#173177'] + 'thing5' => ['value' => $value['thing5'], 'color' => '#173177'], + 'thing19' => ['value' => $value['thing19'], 'color' => '#173177'] ], 'miniprogram' => [ "appid" => "wxaee2df4a4b31df05",