...
|
...
|
@@ -136,6 +136,31 @@ class Index extends Api |
|
|
}
|
|
|
|
|
|
/**
|
|
|
* @ApiTitle (项目校区)
|
|
|
* @ApiMethod (POST)
|
|
|
* @ApiReturnParams (name="code", type="integer", required=true, description="状态码")
|
|
|
* @ApiReturnParams (name="msg", type="string", required=true, description="提示语")
|
|
|
* @ApiReturnParams (name="data", type="object", description="扩展数据返回")
|
|
|
* @ApiReturn ({
|
|
|
"code":"状态码",
|
|
|
"msg": "提示消息",
|
|
|
"data": {}
|
|
|
})
|
|
|
*/
|
|
|
public function getSchoolItem()
|
|
|
{
|
|
|
$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')
|
|
|
->select();
|
|
|
if (empty($data)) {
|
|
|
$this->error('当前还没有校区', ['status' => 2]);
|
|
|
}
|
|
|
$this->success('项目校区', $data);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* @ApiTitle (战队排行榜)
|
|
|
* @ApiMethod (POST)
|
|
|
* @ApiParams (name="campus", type="string", required=true, description="校区id[必填]")
|
...
|
...
|
|