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
c873f074
Commit
c873f074
authored
Sep 28, 2018
by
wwccw0591
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pc
parent
f311f99a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
+6
-5
ClientPush.php
application/library/JPush/ClientPush.php
+4
-4
jpush.php
scripts/crontab/push/jpush.php
+0
-1
news_server.php
scripts/crontab/push/news_server.php
+2
-0
No files found.
application/library/JPush/ClientPush.php
View file @
c873f074
...
...
@@ -68,7 +68,7 @@ class ClientPush
$title
=
$this
->
getMessageType
(
$pushData
[
'fromType'
]);
$messageContent
=
$this
->
getMessageContent
(
$pushData
[
'message'
]);
// $pushObject=array('id'=>$toId,'memberName'=>'abc');
$pushData
[
'toId'
]
=
249
;
//
$pushData['toId']=249;
try
{
$response
=
$this
->
client
->
push
()
->
setPlatform
(
'all'
)
...
...
@@ -87,17 +87,17 @@ class ClientPush
// 'content-available' => true,
// 'mutable-content' => true,
'category'
=>
'shenbd'
,
'extras'
=>
$pushData
[
'message'
]
,
'extras'
=>
$pushData
,
))
->
androidNotification
(
$messageContent
,
array
(
'title'
=>
$title
,
// 'builder_id' => 2,
'extras'
=>
$pushData
[
'message'
]
,
'extras'
=>
$pushData
,
))
->
message
(
$messageContent
,
array
(
'title'
=>
$title
,
'content_type'
=>
$pushData
[
'message'
][
'type'
],
'extras'
=>
$pushData
[
'message'
]
,
'extras'
=>
$pushData
,
))
->
options
(
array
(
// sendno: 表示推送序号,纯粹用来作为 API 调用标识,
...
...
scripts/crontab/push/jpush.php
View file @
c873f074
...
...
@@ -53,7 +53,6 @@ class cliOrderClose extends basecli
$addData
=
unserialize
(
$pushData
);
$addData
[
'message'
]
=
unserialize
(
$addData
[
'message'
]);
$clientPush
->
push
(
$addData
);
exit
;
}
$redis
->
close
();
}
...
...
scripts/crontab/push/news_server.php
View file @
c873f074
...
...
@@ -115,6 +115,8 @@ $serv->on('Message', function($server, $frame) use($conf){
$redis
->
hSet
(
KEY_PRE
.
$memberId
,
'sendTime'
,
time
());
$server
->
push
(
$frame
->
fd
,
responseJson
(
1
,
"sendMsg"
,
"success"
,
$sendMessage
));
$messageService
->
addMessage
(
$sendMessage
[
'fromId'
],
$sendMessage
[
'fromUserId'
],
$sendMessage
[
'fromUserName'
],
$sendMessage
[
'fromType'
],
$sendMessage
[
'message'
],
$sendMessage
[
'toId'
],
$sendMessage
[
'toUserId'
],
$sendMessage
[
'toUserName'
],
$sendMessage
[
'toType'
],
$sendMessage
[
'id'
]);
$sendMessage
[
'message'
]
=
serialize
(
$sendMessage
[
'message'
]);
$redis
->
rPush
(
'push_center'
,
serialize
(
$sendMessage
));
}
$redis
->
close
();
$messageService
->
unsetDb
();
...
...
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