Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
朱继来
/
后台订单管理
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
1dcb443c
authored
Nov 14, 2018
by
朱继来
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'zjl_adjust_20181026' into development
parents
3a001c3a
5770e80b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
17 deletions
config/monitorDing.php
vendor/redgo/monitor-ding/src/MonitorDingClient.php
config/monitorDing.php
View file @
1dcb443c
...
...
@@ -2,7 +2,7 @@
return
[
// 是否开启报错写入
'enabled'
=>
true
,
'enabled'
=>
env
(
'DING_ALERT'
,
false
)
,
// curl证书验证, 线下环境不用开启
'curl_verify'
=>
true
,
...
...
vendor/redgo/monitor-ding/src/MonitorDingClient.php
View file @
1dcb443c
...
...
@@ -92,24 +92,26 @@ class MonitorDingClient {
if
(
!
config
(
'monitorDing.enabled'
))
{
\Log
::
info
(
'~~ Monitor Ding ~~'
);
\Log
::
info
(
$params
);
}
}
else
{
$ch
=
curl_init
();
curl_setopt
(
$ch
,
CURLOPT_URL
,
$this
->
webhook
);
curl_setopt
(
$ch
,
CURLOPT_POST
,
1
);
curl_setopt
(
$ch
,
CURLOPT_CONNECTTIMEOUT
,
5
);
curl_setopt
(
$ch
,
CURLOPT_HTTPHEADER
,
array
(
'Content-Type: application/json;charset=utf-8'
));
curl_setopt
(
$ch
,
CURLOPT_POSTFIELDS
,
json_encode
(
$params
));
curl_setopt
(
$ch
,
CURLOPT_RETURNTRANSFER
,
true
);
if
(
$this
->
curl_verify
)
{
curl_setopt
(
$ch
,
CURLOPT_SSL_VERIFYHOST
,
0
);
curl_setopt
(
$ch
,
CURLOPT_SSL_VERIFYPEER
,
0
);
}
$data
=
json_decode
(
curl_exec
(
$ch
),
true
);
curl_close
(
$ch
);
$ch
=
curl_init
();
curl_setopt
(
$ch
,
CURLOPT_URL
,
$this
->
webhook
);
curl_setopt
(
$ch
,
CURLOPT_POST
,
1
);
curl_setopt
(
$ch
,
CURLOPT_CONNECTTIMEOUT
,
5
);
curl_setopt
(
$ch
,
CURLOPT_HTTPHEADER
,
array
(
'Content-Type: application/json;charset=utf-8'
));
curl_setopt
(
$ch
,
CURLOPT_POSTFIELDS
,
json_encode
(
$params
));
curl_setopt
(
$ch
,
CURLOPT_RETURNTRANSFER
,
true
);
if
(
$this
->
curl_verify
)
{
curl_setopt
(
$ch
,
CURLOPT_SSL_VERIFYHOST
,
0
);
curl_setopt
(
$ch
,
CURLOPT_SSL_VERIFYPEER
,
0
);
if
(
$data
[
'errcode'
])
{
throw
new
SendErrorException
(
$data
[
'errmsg'
]);
}
}
$data
=
json_decode
(
curl_exec
(
$ch
),
true
);
curl_close
(
$ch
);
if
(
$data
[
'errcode'
])
{
throw
new
SendErrorException
(
$data
[
'errmsg'
]);
}
}
}
\ No newline at end of file
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