Browse Source

Merge remote-tracking branch 'origin/master'

master
王泽彦 8 months ago
parent
commit
298124e7e2
  1. 4
      niucloud/app/api/controller/login/Login.php
  2. 21
      niucloud/app/common.php

4
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' => ''
]
);

21
niucloud/app/common.php

@ -1408,8 +1408,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;
@ -1425,16 +1425,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",
@ -1444,13 +1443,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",

Loading…
Cancel
Save