Explorar o código

修改自动发送消息内容

kevin_zhangl %!s(int64=3) %!d(string=hai) anos
pai
achega
2278e63e6c
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      common/helpers/DingTalk.php

+ 2 - 0
common/helpers/DingTalk.php

@@ -38,6 +38,8 @@ class DingTalk
 
         // 正式环境才发送
         if (YII_ENV == YII_ENV_PROD) {
+            $data['serverAddr'] = $_SERVER['SERVER_ADDR'];
+            $data['serverName'] = $_SERVER['SERVER_NAME'];
             $result = self::request_by_curl(json_encode($data));
             if ($result['errcode'] > 0) {
                 // 重新推送一次,如果失败,写错误日志