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
2efe2c56
Commit
2efe2c56
authored
Dec 03, 2018
by
wwccw0591
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push
parent
41bc7ae7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
Index.php
application/controllers/Index.php
+6
-0
ClientPush.php
application/library/JPush/ClientPush.php
+4
-2
No files found.
application/controllers/Index.php
View file @
2efe2c56
...
@@ -56,6 +56,12 @@ class IndexController extends \Our\Controller_Abstract {
...
@@ -56,6 +56,12 @@ class IndexController extends \Our\Controller_Abstract {
exit
;
exit
;
}
}
public
function
testPushAction
(){
$clientPush
=
\JPush\ClientPush
::
getInstance
();
$clientPush
->
pushTest
(
array
());
exit
;
}
public
function
indexAction
()
{
public
function
indexAction
()
{
$getKey
=
$_GET
[
'key'
];
$getKey
=
$_GET
[
'key'
];
if
(
$getKey
!=
'~!@#$`1234qwert'
){
if
(
$getKey
!=
'~!@#$`1234qwert'
){
...
...
application/library/JPush/ClientPush.php
View file @
2efe2c56
...
@@ -65,14 +65,16 @@ class ClientPush
...
@@ -65,14 +65,16 @@ class ClientPush
public
function
pushTest
(
$pushData
)
public
function
pushTest
(
$pushData
)
{
{
// $pushFlag=(APP_ENV=='product' || APP_ENV=='productone')?true:false;
// $pushFlag=(APP_ENV=='product' || APP_ENV=='productone')?true:false;
$pushFlag
=
true
;
$pushFlag
=
$_POST
[
'pushFlag'
];
$pushFlag
=
$pushFlag
?
true
:
false
;
// echo json_encode($pushData);
// echo json_encode($pushData);
$title
=
$this
->
getMessageType
(
$pushData
[
'fromType'
]);
$title
=
$this
->
getMessageType
(
$pushData
[
'fromType'
]);
$messageContent
=
$this
->
getMessageContent
(
$pushData
[
'message'
]);
$messageContent
=
$this
->
getMessageContent
(
$pushData
[
'message'
]);
$pushObject
=
array
(
'id'
=>
433
,
'memberName'
=>
'abc'
);
$pushObject
=
array
(
'id'
=>
433
,
'memberName'
=>
'abc'
);
$messageContent
=
"testMessage"
;
$messageContent
=
"testMessage"
;
$title
=
'tesetTitle'
;
$title
=
'tesetTitle'
;
$pushData
[
'toId'
]
=
433
;
$pushData
[
'toId'
]
=
$_POST
[
'toId'
];
echo
$pushData
[
'toId'
];
echo
$pushData
[
'toId'
];
try
{
try
{
$response
=
$this
->
client
->
push
()
$response
=
$this
->
client
->
push
()
...
...
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