...
|
...
|
@@ -46,13 +46,15 @@ class Activity extends Api |
|
|
if (!$data) {
|
|
|
$this->error('当前还没有活动', ['status' => 2]);
|
|
|
}
|
|
|
$this->success('全部项目', $data);
|
|
|
$this->success('全部活动', $data);
|
|
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* @ApiTitle (项目校区)
|
|
|
* @ApiMethod (POST)
|
|
|
* @ApiParams (name="id", type="interge", required=true, description="活动id")
|
|
|
* @ApiParams (name="page", type="string", required=false, description="分页")
|
|
|
* @ApiReturnParams (name="code", type="integer", required=true, description="状态码")
|
|
|
* @ApiReturnParams (name="msg", type="string", required=true, description="提示语")
|
|
|
* @ApiReturnParams (name="data", type="object", description="扩展数据返回")
|
...
|
...
|
@@ -64,11 +66,13 @@ class Activity extends Api |
|
|
*/
|
|
|
public function getSchoolItem()
|
|
|
{
|
|
|
$param = $this->request->param();
|
|
|
$data = db('campus c')
|
|
|
->join('activity a','a.id = c.activity_id')
|
|
|
->join('school s','s.id = c.school_id')
|
|
|
->field('c.*,a.title as activity_name,s.title as school_name')
|
|
|
->paginate(10,false);
|
|
|
->where('c.activity_id',$param['id'])
|
|
|
->paginate(10,false,['page'=>$param['page']]);
|
|
|
if (empty($data)) {
|
|
|
$this->error('当前还没有校区', ['status' => 2]);
|
|
|
}
|
...
|
...
|
|