diff --git a/app/Http/Admin/Views/index/main_app_info.volt b/app/Http/Admin/Views/index/main_app_info.volt index eaa4b24e..4264d58e 100644 --- a/app/Http/Admin/Views/index/main_app_info.volt +++ b/app/Http/Admin/Views/index/main_app_info.volt @@ -6,7 +6,7 @@
- + @@ -24,4 +24,4 @@
- \ No newline at end of file + diff --git a/app/Http/Admin/Views/index/main_server_info.volt b/app/Http/Admin/Views/index/main_server_info.volt index c8cf9cda..e44170dc 100644 --- a/app/Http/Admin/Views/index/main_server_info.volt +++ b/app/Http/Admin/Views/index/main_server_info.volt @@ -1,9 +1,9 @@ -
+
服务器信息
- + @@ -22,4 +22,4 @@
-
\ No newline at end of file +
diff --git a/app/Http/Admin/Views/index/main_team_info.volt b/app/Http/Admin/Views/index/main_team_info.volt index 549be66c..4b16d89d 100644 --- a/app/Http/Admin/Views/index/main_team_info.volt +++ b/app/Http/Admin/Views/index/main_team_info.volt @@ -3,7 +3,7 @@
- + @@ -26,4 +26,4 @@
- \ No newline at end of file + diff --git a/app/Models/PointHistory.php b/app/Models/PointHistory.php index abaaad3e..5894a71f 100644 --- a/app/Models/PointHistory.php +++ b/app/Models/PointHistory.php @@ -20,7 +20,7 @@ class PointHistory extends Model const EVENT_SITE_VISIT = 5; // 站点访问 const EVENT_CHAPTER_STUDY = 6; // 课时学习 const EVENT_COURSE_REVIEW = 7; // 课程评价 - const EVENT_IM_DISCUSS = 8; // 微聊讨论 + const EVENT_IM_DISCUSS = 8; // 微聊讨论(已弃用) const EVENT_COMMENT_POST = 9; // 发布评论 const EVENT_ARTICLE_POST = 10; // 发布文章 const EVENT_QUESTION_POST = 11; // 发布问题 @@ -132,7 +132,6 @@ class PointHistory extends Model self::EVENT_SITE_VISIT => '用户登录', self::EVENT_CHAPTER_STUDY => '课时学习', self::EVENT_COURSE_REVIEW => '课程评价', - self::EVENT_IM_DISCUSS => '微聊讨论', ]; } diff --git a/app/Services/Logic/Point/History/ImDiscuss.php b/app/Services/Logic/Point/History/ImDiscuss.php deleted file mode 100644 index 624265e2..00000000 --- a/app/Services/Logic/Point/History/ImDiscuss.php +++ /dev/null @@ -1,63 +0,0 @@ -getSettings('point'); - - $pointEnabled = $setting['enabled'] ?? 0; - - if ($pointEnabled == 0) return; - - $eventRule = json_decode($setting['event_rule'], true); - - $eventEnabled = $eventRule['im_discuss']['enabled'] ?? 0; - - if ($eventEnabled == 0) return; - - $eventPoint = $eventRule['im_discuss']['point'] ?? 0; - - if ($eventPoint <= 0) return; - - $eventId = $message->sender_id; - $eventType = PointHistoryModel::EVENT_IM_DISCUSS; - $eventInfo = new \stdClass(); - - $historyRepo = new PointHistoryRepo(); - - $history = $historyRepo->findDailyEventHistory($eventId, $eventType, date('Ymd')); - - if ($history) return; - - $userRepo = new UserRepo(); - - $user = $userRepo->findById($message->sender_id); - - $history = new PointHistoryModel(); - - $history->user_id = $user->id; - $history->user_name = $user->name; - $history->event_id = $eventId; - $history->event_type = $eventType; - $history->event_info = $eventInfo; - $history->event_point = $eventPoint; - - $this->handlePointHistory($history); - } - -} diff --git a/app/Services/Logic/Point/History/SiteVisit.php b/app/Services/Logic/Point/History/SiteVisit.php index 58c44c81..04442d37 100644 --- a/app/Services/Logic/Point/History/SiteVisit.php +++ b/app/Services/Logic/Point/History/SiteVisit.php @@ -35,7 +35,7 @@ class SiteVisit extends PointHistory $eventId = $user->id; $eventType = PointHistoryModel::EVENT_SITE_VISIT; - $eventInfo = new \stdClass(); + $eventInfo = []; $historyRepo = new PointHistoryRepo(); diff --git a/bootstrap/ErrorHandler.php b/bootstrap/ErrorHandler.php index 4a279d1b..cc2ebf5b 100644 --- a/bootstrap/ErrorHandler.php +++ b/bootstrap/ErrorHandler.php @@ -40,7 +40,7 @@ abstract class ErrorHandler extends Injectable { $error = error_get_last(); - if ($error !== NULL && in_array($error['type'], [E_ERROR, E_PARSE, E_CORE_ERROR, E_COMPILE_ERROR])) { + if ($error !== null && in_array($error['type'], [E_ERROR, E_PARSE, E_CORE_ERROR, E_COMPILE_ERROR])) { $logger = $this->getLogger();