Commit 9046729c authored by shajiaiming's avatar shajiaiming

根据id查询

parent 74f824c2
...@@ -80,6 +80,32 @@ class ExploreController extends BaseController ...@@ -80,6 +80,32 @@ class ExploreController extends BaseController
return ['code' => $code, 'msg' => $msg, 'data' => $data]; return ['code' => $code, 'msg' => $msg, 'data' => $data];
} }
public function actionSearch()
{
$header = Yii::$app->request->headers;
$platform_id = $header['FZM-PLATFORM-ID'] ?? null;
$ids = Yii::$app->request->get('ids', '');
if (false == $platform_id || false == $ids) {
$msg = '参数错误';
$code = -1;
$data = null;
goto doEnd;
}
$id_arr = explode(',', $ids);
$apps_model = ExploreApp::find()->select('id, name, icon, type, app_url, slogan')
->where(['in', 'id', $id_arr])
->all();
foreach ($apps_model as &$app) {
$app->name = $app->name[$this->lang];
}
$data = $apps_model;
$msg = 'success';
$code = 0;
doEnd :
return ['code' => $code, 'msg' => $msg, 'data' => $data];
}
public function actionBanner() public function actionBanner()
{ {
$msg = 'ok'; $msg = 'ok';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment