|
@@ -84,10 +84,10 @@ class FeaturesController extends BaseController
|
84
|
84
|
$menuList = Menu::selectRecommend(0, $time);
|
85
|
85
|
return $this->response->array(self::returnValue(['data' => $menuList], 200));
|
86
|
86
|
}
|
87
|
|
- //获取banner推荐菜品
|
|
87
|
+ //获取banner
|
88
|
88
|
public function getBannerRecommend(Request $request)
|
89
|
89
|
{
|
90
|
|
- $menuList = Menu::selectRecommend(1);
|
|
90
|
+ $menuList =DB::table('news')->where('imgUrl','!=','None')->where('imgUrl','!=','')->limit(3);
|
91
|
91
|
return $this->response->array(self::returnValue(['data' => $menuList], 200));
|
92
|
92
|
}
|
93
|
93
|
//获取推荐标签
|
|
@@ -339,6 +339,9 @@ class FeaturesController extends BaseController
|
339
|
339
|
public function menuDetail(Request $request){
|
340
|
340
|
$id=$request->input('id');
|
341
|
341
|
$menu=Menu::where('id',$id)->first();
|
|
342
|
+ if(!$menu){
|
|
343
|
+ return $this->response->array(self::returnValue(['data' => 'menu is not found'], 1099));
|
|
344
|
+ }
|
342
|
345
|
if(!$this->startsWith($menu['url'],'http') && $menu['url'] !='None' && $menu['url']!=''){
|
343
|
346
|
$menu['url']=config('constants.HOST_URL').$menu['url'];
|
344
|
347
|
}
|