|
|
@@ -57,14 +57,26 @@ class IndexController extends FrontController
|
|
|
->orderBy('sort','asc')
|
|
|
->get();
|
|
|
|
|
|
- $data = [];
|
|
|
+ $cn_data = [];
|
|
|
+ $en_data = [];
|
|
|
|
|
|
foreach ($list as $value){
|
|
|
- $res['title'] = $value['title'];
|
|
|
- $res['cn']['image'] = $value['cn_image'];
|
|
|
- $res['en']['image'] = $value['en_image'];
|
|
|
- $data[] = $res;
|
|
|
+ $cn['title'] = $value['title'];
|
|
|
+ $cn['image'] = $value['cn_image'];
|
|
|
+
|
|
|
+ $en['title'] = $value['title'];
|
|
|
+ $en['image'] = $value['en_image'];
|
|
|
+
|
|
|
+ $cn_data[] = $cn;
|
|
|
+ $en_data[] = $en;
|
|
|
}
|
|
|
- return $this->apiResponseSuccess('获取成功',$data);
|
|
|
+
|
|
|
+ $cn_datas['items'] = $cn_data;
|
|
|
+ $en_datas['items'] = $en_data;
|
|
|
+
|
|
|
+ return $this->apiResponseSuccess('获取成功',[
|
|
|
+ 'cn' => $cn_datas,
|
|
|
+ 'en' => $en_datas,
|
|
|
+ ]);
|
|
|
}
|
|
|
}
|