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

@@ -10,13 +10,15 @@ namespace app\api\logic;
use wanghua\general_utility_tools_php\http\Curl;
use wanghua\general_utility_tools_php\SundryConfig;
use wanghua\general_utility_tools_php\tool\Tools;
/**
* python项目逻辑
* Class PyappLofic
* @package app\api\logic
*/
class PyappLofic extends BaseLogic
class PyappLofic
{
/**
@@ -25,16 +27,18 @@ class PyappLofic extends BaseLogic
* @throws \Exception
*/
function setFollowupModel($chatroom_id,$follow_up_content){
$url = '/vip_groups/follow-up';
$base_url = SundryConfig::val('py_app_base_url');
$url = $base_url.'/vip_groups/follow-up';
$post_data = [
'chatroom_id' => $chatroom_id,
'followup_model' => true,
'is_follow_up' => true,
'follow_up_content'=>$follow_up_content
];
$res = Curl::curl_post($url, $post_data);
$res = Curl::curl_post_json($url, $post_data);
if(empty($res['data'])){
throw new \Exception('设置回访模式失败');
return Tools::set_fail('设置回访模式失败',$res);
}
$res_data = json_decode($res['data'], true);
return $res_data;
@@ -46,7 +50,7 @@ class PyappLofic extends BaseLogic
* @throws \Exception
*/
function closeFollowupModel($chatroom_id){
$base_url = config('py_app_base_url.base_url');
$base_url = SundryConfig::val('py_app_base_url');
$url = $base_url.'/vip_groups/follow-up';
$post_data = [