|
@@ -186,6 +186,25 @@ class BeanRepository
|
|
|
$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"
|
|
|
+ ];
|
|
|
+ if($backyard){
|
|
|
+ $star_home['backyard']['backyard_open'] = $backyard['backyard_open'];
|
|
|
+ $star_home['backyard']['backyard_img'] = $backyard['backyard_img'];
|
|
|
+ }else{
|
|
|
+ $star_home['backyard']['backyard_open'] = 0;
|
|
|
+ $star_home['backyard']['backyard_img'] = '';
|
|
|
+ }
|
|
|
return $star_home;
|
|
|
|
|
|
}
|
|
@@ -205,6 +224,21 @@ class BeanRepository
|
|
|
|
|
|
}
|
|
|
|
|
|
+ //获取用户后院权限等信息
|
|
|
+ function backyard($uid)
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ $url = config("customer.app_service_url").'/user/v2/backyard';
|
|
|
+ $array = [
|
|
|
+ 'json' => ['uid' => $uid], 'query' => [], 'http_errors' => false,'headers'=>['Authorization'=>"Bearer ".JWTAuth::getToken()]
|
|
|
+ ];
|
|
|
+ return http($url,$array,'get');
|
|
|
+ } catch (\Exception $e) {
|
|
|
+ return [];
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
//获取每日新闻
|
|
|
function getNews($request) {
|
|
|
try {
|