Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
my-yaf-project
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
chenchuanwen
my-yaf-project
Commits
046f2cbb
Commit
046f2cbb
authored
Nov 12, 2018
by
christ
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
message
parent
8623f0ec
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
news_server.php
scripts/crontab/push/news_server.php
+3
-3
No files found.
scripts/crontab/push/news_server.php
View file @
046f2cbb
...
@@ -241,7 +241,6 @@ $tcp_server->on('receive', function($serv, $fd, $from_id, $data) use($conf) {
...
@@ -241,7 +241,6 @@ $tcp_server->on('receive', function($serv, $fd, $from_id, $data) use($conf) {
if
(
!
isset
(
$data
[
'uid'
])
||
empty
(
$data
[
'uid'
])){
if
(
!
isset
(
$data
[
'uid'
])
||
empty
(
$data
[
'uid'
])){
foreach
(
$data
[
'data'
]
as
$value
){
foreach
(
$data
[
'data'
]
as
$value
){
if
(
isset
(
$value
[
'type'
])
&&
$value
[
'type'
]
>
100
){
if
(
isset
(
$value
[
'type'
])
&&
$value
[
'type'
]
>
100
){
echo
json_encode
(
$value
);
$sendStoreFd
=
$redis
->
hGet
(
KEY_PRE_STORE
.
$value
[
'storeId'
],
'fd'
);
$sendStoreFd
=
$redis
->
hGet
(
KEY_PRE_STORE
.
$value
[
'storeId'
],
'fd'
);
if
(
!
empty
(
$sendStoreFd
)){
if
(
!
empty
(
$sendStoreFd
)){
if
(
!
$value
[
'message'
]){
if
(
!
$value
[
'message'
]){
...
@@ -303,8 +302,8 @@ $serv->on('Close', function($server, $fd) use($conf){
...
@@ -303,8 +302,8 @@ $serv->on('Close', function($server, $fd) use($conf){
});
});
function
responseJson
(
$status
=
1
,
$method
,
$message
=
''
,
$data
=
array
())
{
function
responseJson
(
$status
=
1
,
$method
,
$message
=
''
,
$data
=
array
())
{
if
(
!
$
message
){
if
(
!
$
data
[
'message'
]
){
$
message
=
new
\stdClass
();
$
data
[
'message'
]
=
new
\stdClass
();
}
}
$data
=
[
$data
=
[
'status'
=>
$status
,
'status'
=>
$status
,
...
@@ -312,6 +311,7 @@ function responseJson($status = 1,$method, $message = '', $data = array()) {
...
@@ -312,6 +311,7 @@ function responseJson($status = 1,$method, $message = '', $data = array()) {
'message'
=>
$message
,
'message'
=>
$message
,
'data'
=>
$data
,
'data'
=>
$data
,
];
];
echo
json_encode
(
$data
);
return
json_encode
(
$data
);
return
json_encode
(
$data
);
}
}
$serv
->
start
();
$serv
->
start
();
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