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
d1f9a763
Commit
d1f9a763
authored
Oct 16, 2018
by
wwccw0591
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
set
parent
11739483
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
Message.php
application/controllers/Message.php
+5
-3
No files found.
application/controllers/Message.php
View file @
d1f9a763
...
...
@@ -153,9 +153,11 @@ class MessageController extends \Our\Controller_AbstractApi {
}
public
function
setAction
(){
$messageService
=
\Business\Message\MessageServiceModel
::
getInstance
();
$pushSet
[
'canPush'
]
=
$this
->
req
[
'data'
][
'canPush'
];
$pushSet
[
'sound'
]
=
$this
->
req
[
'data'
][
'sound'
];
$pushSet
[
'vibrate'
]
=
$this
->
req
[
'data'
][
'vibrate'
];
$memberCenterService
=
\Business\User\MemberCenterServiceModel
::
getInstance
();
$messageSet
=
$memberCenterService
->
getMessageSet
(
$this
->
memberId
);
$pushSet
[
'canPush'
]
=!
empty
(
$this
->
req
[
'data'
][
'canPush'
])
?
$this
->
req
[
'data'
][
'canPush'
]
:
$messageSet
[
'canPush'
];
$pushSet
[
'sound'
]
=!
empty
(
$this
->
req
[
'data'
][
'sound'
])
?
$this
->
req
[
'data'
][
'sound'
]
:
$messageSet
[
'sound'
];
$pushSet
[
'vibrate'
]
=!
empty
(
$this
->
req
[
'data'
][
'vibrate'
])
?
$this
->
req
[
'data'
][
'vibrate'
]
:
$messageSet
[
'vibrate'
];
$pushSet
[
'timeDiff'
]
=
$this
->
req
[
'data'
][
'timeDiff'
];
if
(
isset
(
$pushSet
[
'canPush'
])
&&
isset
(
$pushSet
[
'sound'
])
&&
isset
(
$pushSet
[
'vibrate'
])
){
$res
=
$messageService
->
set
(
$this
->
memberId
,
$pushSet
);
...
...
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