Commit 7043b84a authored by clone's avatar clone

bug

parent 0260ea06
......@@ -28,7 +28,7 @@ class RPush
{
//todo 这里做算法优化,环信接口有限制,每个时间段最多能推送多少请求
$response = $this->sendRequestByCurl($target_type, $target, $type, $msg_content, $from, $access_token);
$response = $this->sendRequestByCurl($target_type, $target, $msg_content, $from, $access_token);
call_user_func_array([ $callback[0], $callback[1] ], [ $response, $target, $from, $msg_content ]);
......@@ -44,12 +44,12 @@ class RPush
* @param $access_token
* @return \app\chat\utils\CurlResponse|bool
*/
public function sendRequestByCurl($target_type, $target, $type, $msg_content, $from ,$access_token)
public function sendRequestByCurl($target_type, $target, $msg_content, $from ,$access_token)
{
$arr = array(
'target_type' => $target_type,
'target' => $target,
'msg' => [ "type" => $type, "msg" => $msg_content ],
'msg' => [ "type" => "txt", "msg" => $msg_content ],
'from' => $from,
);
$data = json_encode($arr);
......@@ -65,6 +65,7 @@ class RPush
];
$url = $this->buildSendUrl();
$response = $curl->post($url, $data);
dump($response);
return $response;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment