Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
pearProject
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
安宁
pearProject
Commits
bd002ddd
Commit
bd002ddd
authored
Aug 31, 2021
by
安宁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
不同项目发送不同机器人
parent
be5c78fd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
2 deletions
+20
-2
DingDing.php
application/common/Model/DingDing.php
+13
-0
Task.php
application/project/behavior/Task.php
+7
-2
No files found.
application/common/Model/DingDing.php
0 → 100644
View file @
bd002ddd
<?php
namespace
app\common\Model
;
/**
* 钉钉机器人
* Class TaskLike
* @package app\common\Model
*/
class
DingDing
extends
CommonModel
{
protected
$append
=
[];
}
application/project/behavior/Task.php
View file @
bd002ddd
...
...
@@ -16,6 +16,7 @@ use app\common\Model\ProjectVersion;
use
app\common\Model\TaskMember
;
use
app\common\Model\TaskStages
;
use
app\common\Model\TaskWorkflowRule
;
use
app\common\Model\DingDing
;
use
Exception
;
use
mail\Mail
;
use
message\DingTalk
;
...
...
@@ -323,13 +324,17 @@ class Task
public
function
dingding
(
$type
,
$task
,
$obj
)
{
$dingding
=
DingDing
::
where
([
'project'
=>
$task
[
'project_code'
]])
->
find
();
if
(
!
$dingding
)
{
return
;
}
$ding
=
new
\DingNotice\DingTalk
([
"default"
=>
[
'enabled'
=>
true
,
'token'
=>
"a4eeb2dc0dd7a3cc627a0e9cff12487b393b667d35d1c3598f3e987536e33e6c"
,
'token'
=>
$dingding
[
'token'
]
,
'timeout'
=>
2.0
,
'ssl_verify'
=>
false
,
'secret'
=>
'SEC216b9359e12f0193a623ec3e4da2d65ce6fb6d29c16cb9f98be29d6b476303ad'
,
'secret'
=>
$dingding
[
'secret'
]
,
]
]);
$data
=
''
;
...
...
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