This commit is contained in:
2025-03-27 21:24:55 +08:00
parent 04cb00948d
commit 2e6ffc2a25
8 changed files with 164 additions and 7 deletions

View File

@@ -0,0 +1,34 @@
<?php
/*
* description
* authorwh
* email
* createTime{2025/3/27} {19:50}
*/
namespace app\api\logic;
use wanghua\general_utility_tools_php\tool\Tools;
class MessageLogic extends BaseLogic
{
///message/postText
public function postText($data)
{
$url = '/message/postText';
$post_data = [
'appId'=>$data['appId'],
'toWxid'=>$data['toWxid'],
'content'=>$data['content'],
//@的好友,多个英文逗号分隔。群主或管理员@全部的人,则填写'notify@all'
'ats'=>$data['ats'],
];
Tools::log_to_write_txt(['发送文字消息,入参:$post_data'=>$post_data]);
$res = $this->curl_post_json($url, $post_data);
Tools::log_to_write_txt(['发送文字消息,出参:$res'=>$res]);
return $res;
}
}