|
@@ -209,9 +209,26 @@ class BeanRepository
|
|
}
|
|
}
|
|
$star_home['user']['username'] = $userInfo['username'];
|
|
$star_home['user']['username'] = $userInfo['username'];
|
|
$star_home['user']['avatar'] = $userInfo['avatar'];
|
|
$star_home['user']['avatar'] = $userInfo['avatar'];
|
|
|
|
+ //battle信息
|
|
|
|
+ $activityInfo = $this->getActivity();
|
|
|
|
+ $star_home['battle']['img'] = 'https://uptoyo.oss-cn-zhangjiakou.aliyuncs.com/201908/1565169937_5d4a9911defca.jpg';
|
|
|
|
+ $star_home['battle']['news'] = Redis::get('battle_latest_info_'.$activityInfo['id'])??'战场四平八稳,劳驾老板亲自去战场督战';
|
|
return $star_home;
|
|
return $star_home;
|
|
|
|
|
|
}
|
|
}
|
|
|
|
+ function getActivity(){
|
|
|
|
+ $activity = config('customer.battle_activity_info');
|
|
|
|
+ $activityInfo = ['id'=>1];
|
|
|
|
+ if($activity){
|
|
|
|
+ try{
|
|
|
|
+ $activityInfo = \GuzzleHttp\json_decode($activity,true);
|
|
|
|
+ }catch (\Exception $e){
|
|
|
|
+ Log::debug('解析活动信息配置失败:'.$e->getMessage());
|
|
|
|
+ return $activityInfo;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return $activityInfo;
|
|
|
|
+ }
|
|
|
|
|
|
//获取某用户豆数
|
|
//获取某用户豆数
|
|
function get_user_bean($uid)
|
|
function get_user_bean($uid)
|