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
e04dcd6f
Commit
e04dcd6f
authored
Jun 15, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
推送公告
parent
6d4ba29e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
1 deletion
+18
-1
PushMessageService.php
application/api_broker/service/PushMessageService.php
+13
-0
Notice.php
application/index/controller/Notice.php
+5
-1
No files found.
application/api_broker/service/PushMessageService.php
View file @
e04dcd6f
...
...
@@ -138,6 +138,19 @@ class PushMessageService
return
;
}
/**
* 推送全部人员,带跳转。
*
* @param string $title
* @param string $content
* @param string $url
*/
public
function
pushAll
(
string
$title
=
''
,
string
$content
=
''
,
string
$url
=
''
)
{
$url
=
$this
->
push
->
http_host
()
.
'/'
.
$url
;
$this
->
push
->
push_message_for_all
(
$title
,
$content
,
$url
);
return
;
}
/**
* 普通消息推送
*
...
...
application/index/controller/Notice.php
View file @
e04dcd6f
...
...
@@ -9,6 +9,7 @@
namespace
app\index\controller
;
use
app\api_broker\service\PushMessageService
;
use
app\index\extend\Basic
;
use
app\model\PushFeed
;
use
think\Request
;
...
...
@@ -85,11 +86,14 @@ class Notice extends Basic
$data
[
'steel_phone'
]
=
0
;
$data
[
'type'
]
=
1
;
$num
=
$this
->
m_push
->
editData
(
$data
);
if
(
$num
<
1
)
{
return
$this
->
response
(
101
,
'新增公告失败!'
);
}
$service_push
=
new
PushMessageService
();
$url
=
'app/dist/index.html#/announcementDetails?id='
.
$this
->
m_push
->
id
;
$service_push
->
pushAll
(
$data
[
'title'
],
$data
[
'content'
],
$url
);
return
$this
->
response
(
200
,
'新增成功!'
);
}
...
...
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