Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
services
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tencent
services
Commits
5f10ef73
Commit
5f10ef73
authored
Jun 17, 2020
by
xmy
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ft-notice'
parents
ca285118
4b399344
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
2 deletions
+40
-2
src/Common/Config/Bean/PathConfig.php
+40
-2
No files found.
src/Common/Config/Bean/PathConfig.php
View file @
5f10ef73
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
* Date: 2018/7/16
* Date: 2018/7/16
* Time: 11:09
* Time: 11:09
*/
*/
$basePath
=
dirname
(
__DIR__
,
3
);
$basePath
=
dirname
(
__DIR__
,
3
);
/**
/**
* 用于自建组件扫描路径配置(键值是方便开发人员理解,代码中无意义)
* 用于自建组件扫描路径配置(键值是方便开发人员理解,代码中无意义)
...
@@ -15,7 +15,45 @@ $basePath = dirname(__DIR__,3);
...
@@ -15,7 +15,45 @@ $basePath = dirname(__DIR__,3);
*
*
* ];
* ];
*/
*/
if
(
!
function_exists
(
'buildNotice'
)){
function
buildNotice
(
$msg
)
{
$jsonStr
=
json_encode
([
'msgtype'
=>
'text'
,
'text'
=>
[
'content'
=>
$msg
]
]);
$url
=
"https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=97225115-5aa1-47e9-a029-04d0c25abb47"
;
$ch
=
curl_init
();
curl_setopt
(
$ch
,
CURLOPT_POST
,
1
);
curl_setopt
(
$ch
,
CURLOPT_URL
,
$url
);
curl_setopt
(
$ch
,
CURLOPT_POSTFIELDS
,
$jsonStr
);
curl_setopt
(
$ch
,
CURLOPT_RETURNTRANSFER
,
1
);
curl_setopt
(
$ch
,
CURLOPT_HTTPHEADER
,
array
(
'Content-Type: application/json; charset=utf-8'
,
'Content-Length: '
.
strlen
(
$jsonStr
)
)
);
$response
=
curl_exec
(
$ch
);
$httpCode
=
curl_getinfo
(
$ch
,
CURLINFO_HTTP_CODE
);
curl_close
(
$ch
);
return
array
(
$httpCode
,
$response
);
}
}
try
{
if
(
!
env
(
"NOT_NOTICE"
)
&&
posix_getpid
()
==
16
)
{
$msg
=
"环境:"
.
env
(
"ENVIRONMENT"
)
.
" 项目名称:"
.
APP_NAME
.
"————构建成功!"
;
buildNotice
(
$msg
);
}
}
catch
(
Exception
$e
)
{
var_dump
(
$e
->
getMessage
());
}
return
[
return
[
'commonPath'
=>
$basePath
.
'/Common'
,
'commonPath'
=>
$basePath
.
'/Common'
,
];
];
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