|
@@ -189,21 +189,23 @@ class BeanRepository
|
|
|
$star_home['mybean']['yesterday_add_user'] = intval($user_bean['yesterday_add_user']) ?? 0;//昨日新增老板
|
|
|
$star_home['mybean']['yesterday_quantity_issued'] = intval($yesterday_quantity_issued) ?? 0;//昨日发放总U米
|
|
|
|
|
|
- $star_home['excellent_residents'] = $this->excellentResidents($request) ?? [];
|
|
|
+ //$star_home['excellent_residents'] = $this->excellentResidents($request) ?? [];
|
|
|
$star_home['daily_news'] = $this->getNews($request);
|
|
|
$star_home['tips'] = $this->getPlatformContent($id = 1);
|
|
|
|
|
|
$backyard = $this->backyard($uid);
|
|
|
|
|
|
$star_home['backyard']['backyard_imgs'] = [
|
|
|
- "http://oss.caihongxingqiu.com/h5/planet/cover_01.png",
|
|
|
- "http://oss.caihongxingqiu.com/h5/planet/cover_02.png",
|
|
|
- "http://oss.caihongxingqiu.com/h5/planet/cover_03.png",
|
|
|
- "http://oss.caihongxingqiu.com/h5/planet/cover_04.png",
|
|
|
- "http://oss.caihongxingqiu.com/h5/planet/cover_05.png",
|
|
|
- "http://oss.caihongxingqiu.com/h5/planet/cover_06.png",
|
|
|
- "http://oss.caihongxingqiu.com/h5/planet/cover_07.png",
|
|
|
- "http://oss.caihongxingqiu.com/h5/planet/cover_08.png"
|
|
|
+ "http://oss.uptoyo.com/h5/planet/cover_01.png",
|
|
|
+ "http://oss.uptoyo.com/h5/planet/cover_02.png",
|
|
|
+ "http://oss.uptoyo.com/h5/planet/cover_03.png",
|
|
|
+ "http://oss.uptoyo.com/h5/planet/cover_04.png",
|
|
|
+ "http://oss.uptoyo.com/h5/planet/cover_05.png",
|
|
|
+ "http://oss.uptoyo.com/h5/planet/cover_06.png",
|
|
|
+ "http://oss.uptoyo.com/h5/planet/cover_07.png",
|
|
|
+ "http://oss.uptoyo.com/h5/planet/cover_08.png",
|
|
|
+ "http://oss.uptoyo.com/h5/planet/cover_09.png",
|
|
|
+ "http://oss.uptoyo.com/h5/planet/cover_10.png"
|
|
|
];
|
|
|
if ($backyard) {
|
|
|
$star_home['backyard']['backyard_open'] = $backyard['backyard_open'];
|
|
@@ -219,6 +221,38 @@ class BeanRepository
|
|
|
$star_home['battle']['start'] = $activityInfo['start'];
|
|
|
$star_home['battle']['end'] = $activityInfo['end'];
|
|
|
$star_home['battle']['news'] = Redis::get('battle_latest_info_'.$activityInfo['id'])??'战场四平八稳,劳驾老板亲自去战场督战';
|
|
|
+
|
|
|
+ //聊天室
|
|
|
+ $tmpChatroom = Redis::get('user_service_chatroom');
|
|
|
+ $chatrooms = $tmpChatroom?json_decode($tmpChatroom,true):[];
|
|
|
+ $current = Carbon::now()->format('H:i:s');
|
|
|
+ $chatRoomsData1 = [];
|
|
|
+ $chatRoomsData0 = [];
|
|
|
+ foreach ($chatrooms as &$chatroom) {
|
|
|
+ if ($chatroom['start']<$chatroom['end']) {
|
|
|
+ if ($current<$chatroom['start'] || $current>$chatroom['end']) {
|
|
|
+ $chatroom['is_open'] = 0;
|
|
|
+ $chatRoomsData0[] = $chatroom;
|
|
|
+ } else {
|
|
|
+ $chatroom['is_open'] = 1;
|
|
|
+ $chatRoomsData1[] = $chatroom;
|
|
|
+ }
|
|
|
+ } elseif ($chatroom['start']>$chatroom['end']) {
|
|
|
+ if ($current>$chatroom['end'] && $current<$chatroom['start']) {
|
|
|
+ $chatroom['is_open'] = 0;
|
|
|
+ $chatRoomsData0[] = $chatroom;
|
|
|
+ } else {
|
|
|
+ $chatroom['is_open'] = 1;
|
|
|
+ $chatRoomsData1[] = $chatroom;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ $chatroom['is_open'] = 1;
|
|
|
+ $chatRoomsData1[] = $chatroom;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $star_home['chatroom'] = array_merge($chatRoomsData1, $chatRoomsData0);
|
|
|
+ $star_home['is_show'] = intval(config('customer.exchange_shop_is_show'));
|
|
|
+
|
|
|
return $star_home;
|
|
|
|
|
|
}
|
|
@@ -348,6 +382,8 @@ class BeanRepository
|
|
|
$star_detail['daily_news'] = $this->getNews($request);
|
|
|
$star_detail['exchange'] = $exchange;
|
|
|
|
|
|
+
|
|
|
+
|
|
|
return $star_detail;
|
|
|
|
|
|
}
|
|
@@ -384,6 +420,36 @@ class BeanRepository
|
|
|
$star_lists['daily_news'] = $this->getNews($request);
|
|
|
$star_lists['tips'] = $this->getPlatformContent($id = 1);
|
|
|
|
|
|
+ //聊天室
|
|
|
+ $tmpChatroom = Redis::get('user_service_chatroom');
|
|
|
+ $chatrooms = $tmpChatroom?json_decode($tmpChatroom,true):[];
|
|
|
+ $current = Carbon::now()->format('H:i:s');
|
|
|
+ $chatRoomsData1 = [];
|
|
|
+ $chatRoomsData0 = [];
|
|
|
+ foreach ($chatrooms as &$chatroom) {
|
|
|
+ if ($chatroom['start']<$chatroom['end']) {
|
|
|
+ if ($current<$chatroom['start'] || $current>$chatroom['end']) {
|
|
|
+ $chatroom['is_open'] = 0;
|
|
|
+ $chatRoomsData0[] = $chatroom;
|
|
|
+ } else {
|
|
|
+ $chatroom['is_open'] = 1;
|
|
|
+ $chatRoomsData1[] = $chatroom;
|
|
|
+ }
|
|
|
+ } elseif ($chatroom['start']>$chatroom['end']) {
|
|
|
+ if ($current>$chatroom['end'] && $current<$chatroom['start']) {
|
|
|
+ $chatroom['is_open'] = 0;
|
|
|
+ $chatRoomsData0[] = $chatroom;
|
|
|
+ } else {
|
|
|
+ $chatroom['is_open'] = 1;
|
|
|
+ $chatRoomsData1[] = $chatroom;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ $chatroom['is_open'] = 1;
|
|
|
+ $chatRoomsData1[] = $chatroom;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $star_lists['chatroom'] = array_merge($chatRoomsData1, $chatRoomsData0);
|
|
|
+
|
|
|
return $star_lists;
|
|
|
}
|
|
|
|