This commit is contained in:
2025-03-29 13:59:40 +08:00
parent 4bfb021df2
commit 744815db87
15 changed files with 105 additions and 42 deletions

View File

@@ -0,0 +1,58 @@
<?php
/*
* description
* authorwh
* email
* createTime{2025/3/29} {13:46}
*/
namespace app\api\controller;
use app\api\logic\PyappLofic;
use think\Controller;
class Test extends Controller
{
function test(){
$obj = new PyappLofic();
$res = $obj->setFollowupModel('54116019493@chatroom','测试内容');
dump($res);die;
$url = 'https://wechat-api-test.excn.vip/vip_groups/follow-up';
$data = [
"chatroom_id" => "54116019493@chatroom",
"is_follow_up" => true,
"follow_up_content" => "测试回访内容"
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE );
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE );
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'accept: application/json',
'Content-Type: application/json'
]);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo 'Response:' . $response;
echo 'HTTP Code:' . $httpCode;
}
curl_close($ch);
}
}