caihongxingqiu 5 anni fa
parent
commit
478c42ccbb
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 2 1
      app/Repositories/BeanRepository.php

+ 2 - 1
app/Repositories/BeanRepository.php

@@ -221,7 +221,8 @@ class BeanRepository
         $star_home['battle']['news'] = Redis::get('battle_latest_info_'.$activityInfo['id'])??'战场四平八稳,劳驾老板亲自去战场督战';
 
         //聊天室
-        $chatrooms = json_decode(Redis::get('user_service_chatroom'),true)??[];
+        $tmpChatroom = Redis::get('user_service_chatroom');
+        $chatrooms = $tmpChatroom?json_decode($tmpChatroom,true):[];
         $current = Carbon::now()->format('H:i:s');
         foreach ($chatrooms as &$chatroom) {
             if ($chatroom['start']<$chatroom['end']) {