Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
7043b84a
Commit
7043b84a
authored
Jan 20, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
0260ea06
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
RPush.php
application/chat/utils/RPush.php
+4
-3
No files found.
application/chat/utils/RPush.php
View file @
7043b84a
...
...
@@ -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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment