Bläddra i källkod

修改系统报错提醒

kevin_zhangl 3 år sedan
förälder
incheckning
1c5b393eff
3 ändrade filer med 5 tillägg och 3 borttagningar
  1. 3 2
      common/config/params.php
  2. 1 0
      common/helpers/DingTalk.php
  3. 1 1
      vendor/yiisoft/yii2/web/ErrorHandler.php

+ 3 - 2
common/config/params.php

@@ -354,8 +354,9 @@ return [
     ],
     // 钉钉消息
     'DingTalk' => [
-        'accessToken' => 'b5cc33c4dd000da86c19dd123bd4340e38a19bde5442655468f3d959cb677eb7',
-        'atMobiles'   => ['18511880790'],
+        'accessToken' => 'f6b61da1e4cef364298cbac4cad0af23f19a0b34a113ee4d39986d1f796c51b0',
+        'atMobiles'   => [],
+        'atUserIds'   => ['rob9muw'],
         'isAtAll'     => false,
     ],
 ];

+ 1 - 0
common/helpers/DingTalk.php

@@ -31,6 +31,7 @@ class DingTalk
             'text' => ['content' => $message],
             "at" => [
                 'atMobiles' => \Yii::$app->params['DingTalk']['atMobiles'],
+                'atUserIds' => \Yii::$app->params['DingTalk']['atUserIds'],
                 'isAtAll'   => false,
             ]
         ];

+ 1 - 1
vendor/yiisoft/yii2/web/ErrorHandler.php

@@ -154,7 +154,7 @@ class ErrorHandler extends \yii\base\ErrorHandler
             if (false !== strpos($exception->getMessage(), $item)) {
                 $it = [
                     'name' => ($exception instanceof Exception || $exception instanceof ErrorException) ? $exception->getName() : 'Exception',
-                    'message' => '提醒:' . $exception->getMessage(),
+                    'message' => '(NC)提醒:' . $exception->getMessage(),
                     'code' => $exception->getCode(),
                 ];
                 if ($exception instanceof HttpException) {