|
|
@@ -38,12 +38,14 @@ class DingTalk
|
|
|
];
|
|
|
|
|
|
// 正式环境才发送
|
|
|
- $result = self::request_by_curl(json_encode($data));
|
|
|
- if ($result['errcode'] > 0) {
|
|
|
- // 重新推送一次,如果失败,写错误日志
|
|
|
+ if (in_array($_SERVER['HTTP_HOST'], ['ng-frontend-api.elken.com', 'ng-backend-api.elken.com'])) {
|
|
|
$result = self::request_by_curl(json_encode($data));
|
|
|
- if (!$result['errcode']) {
|
|
|
- LoggerTool::error([$result, $message]);
|
|
|
+ if ($result['errcode'] > 0) {
|
|
|
+ // 重新推送一次,如果失败,写错误日志
|
|
|
+ $result = self::request_by_curl(json_encode($data));
|
|
|
+ if (!$result['errcode']) {
|
|
|
+ LoggerTool::error([$result, $message]);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|