|
@@ -245,7 +245,8 @@ class FeaturesController extends BaseController
|
245
|
245
|
$id=$request->input('id');
|
246
|
246
|
$special=Special::where('id',$id)->first();
|
247
|
247
|
if($special['title']=='上午' || $special['title']=='中午' || $special['title']=='下午'){
|
248
|
|
- $contain_recipes_time=json_decode($special['contain_recipes_time']);
|
|
248
|
+ $contain_recipes_time=json_decode($special['contain_recipes_time'],true);
|
|
249
|
+ arsort($contain_recipes_time);
|
249
|
250
|
$idArr=array();
|
250
|
251
|
$today=date('Y-m-d');
|
251
|
252
|
foreach($contain_recipes_time as $key=>$value){
|
|
@@ -254,7 +255,7 @@ class FeaturesController extends BaseController
|
254
|
255
|
}
|
255
|
256
|
}
|
256
|
257
|
$lastarr=explode(',',$special['contain_recipes']);
|
257
|
|
- $idArr=array_intersect_assoc($idArr,$lastarr);
|
|
258
|
+ $idArr=array_intersect($idArr,$lastarr);
|
258
|
259
|
}else{
|
259
|
260
|
$idArr=explode(',',$special['contain_recipes']);
|
260
|
261
|
}
|
|
@@ -266,9 +267,9 @@ class FeaturesController extends BaseController
|
266
|
267
|
$id=$request->input('id');
|
267
|
268
|
$menu=Menu::where('id',$id)->first();
|
268
|
269
|
$init=array();
|
269
|
|
- $list=explode(',',$menu['ingredients']);
|
|
270
|
+ $list=explode(';',$menu['ingredients']);
|
270
|
271
|
foreach($list as $item){
|
271
|
|
- $origin=explode(':',$item);
|
|
272
|
+ $origin=explode(',',$item);
|
272
|
273
|
$init[$origin[0]]=$origin[1];
|
273
|
274
|
}
|
274
|
275
|
$menu['ingredients']=$init;
|