fixed
This commit is contained in:
65
admin/application/api/logic/PyappLofic.php
Normal file
65
admin/application/api/logic/PyappLofic.php
Normal file
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
/*
|
||||
* description:
|
||||
* author:wh
|
||||
* email:
|
||||
* createTime:{2025/3/28} {21:41}
|
||||
*/
|
||||
|
||||
namespace app\api\logic;
|
||||
|
||||
|
||||
use wanghua\general_utility_tools_php\http\Curl;
|
||||
|
||||
/**
|
||||
* python项目逻辑
|
||||
* Class PyappLofic
|
||||
* @package app\api\logic
|
||||
*/
|
||||
class PyappLofic
|
||||
{
|
||||
|
||||
/**
|
||||
* desc:设置回访模式
|
||||
* author:wh
|
||||
* @throws \Exception
|
||||
*/
|
||||
function setFollowupModel($chatroom_id,$follow_up_content){
|
||||
$base_url = config('py_app_base_url.base_url');
|
||||
$url = $base_url.'/vip_groups/follow-up';
|
||||
|
||||
$post_data = [
|
||||
'chatroom_id' => $chatroom_id,
|
||||
'followup_model' => true,
|
||||
'follow_up_content'=>$follow_up_content
|
||||
];
|
||||
$res = Curl::curl_post($url, $post_data);
|
||||
if(empty($res['data'])){
|
||||
throw new \Exception('设置回访模式失败');
|
||||
}
|
||||
$res_data = json_decode($res['data'], true);
|
||||
return $res_data;
|
||||
}
|
||||
|
||||
/**
|
||||
* desc:关闭回访模式
|
||||
* author:wh
|
||||
* @throws \Exception
|
||||
*/
|
||||
function closeFollowupModel($chatroom_id){
|
||||
$base_url = config('py_app_base_url.base_url');
|
||||
$url = $base_url.'/vip_groups/follow-up';
|
||||
|
||||
$post_data = [
|
||||
'chatroom_id' => $chatroom_id,
|
||||
'followup_model' => false,
|
||||
];
|
||||
$res = Curl::curl_post($url, $post_data);
|
||||
if(empty($res['data'])){
|
||||
throw new \Exception('关闭回访模式失败');
|
||||
}
|
||||
$res_data = json_decode($res['data'], true);
|
||||
return $res_data;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -27,7 +27,8 @@ class TokenLogic extends BaseLogic
|
||||
*/
|
||||
function getToken()
|
||||
{
|
||||
$url = 'https://wechat-api-test.excn.vip/vip_groups/auth_info';
|
||||
$base_url = config('py_app_base_url.base_url');
|
||||
$url = $base_url.'/vip_groups/auth_info';
|
||||
$res = \wanghua\general_utility_tools_php\http\Curl::curl_post($url, []);
|
||||
if(empty($res['data'])){
|
||||
throw new \Exception('获取token失败');
|
||||
|
||||
Reference in New Issue
Block a user