Commit 48037bc6 authored by ZhuChunYang's avatar ZhuChunYang

修改接口格式

parent 142fa194
......@@ -20,11 +20,12 @@ class ApplicationController extends BaseController
*/
public function actionIndex()
{
$result['code'] = 0;
$recommendData = ApplicationBusiness::getRecommendList();
$result['recommend'] =$recommendData;
$data['recommend'] =$recommendData;
$cate_app_data = ApplicationBusiness::getCategoryAppList();
$result['cate_app_data'] = $cate_app_data;
$data['cate_app_data'] = $cate_app_data;
$result['code'] = 0;
$result['data'] = $data;
return $result;
}
......@@ -49,7 +50,7 @@ class ApplicationController extends BaseController
if($id){
return ApplicationBusiness::appInfo($id);
}else{
return ['code' => 1,'msg' => 'id不能为空'];
return ['code' => 1,'data' => [],'msg' => 'id不能为空'];
}
}
......
......@@ -115,9 +115,9 @@ class ApplicationBusiness
$app_item['images'] =[];
}
unset($app_item['image_ids']);
return ['code' => 0,'app_info' => $app_item];
return ['code' => 0,'data' => $app_item];
}
return ['code' => 1, 'msg' => "id不合法"];
return ['code' => 1, 'data' => [],'msg' => "id不合法"];
}
......
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