...
|
...
|
@@ -52,7 +52,7 @@ class Activity extends Api |
|
|
}
|
|
|
|
|
|
/**
|
|
|
* @ApiTitle (项目校区)
|
|
|
* @ApiTitle (届次)
|
|
|
* @ApiMethod (POST)
|
|
|
* @ApiParams (name="id", type="interge", required=true, description="活动id")
|
|
|
* @ApiReturnParams (name="code", type="integer", required=true, description="状态码")
|
...
|
...
|
@@ -74,15 +74,15 @@ class Activity extends Api |
|
|
->where('c.activity_id',$param['id'])
|
|
|
->select();
|
|
|
if (empty($data)) {
|
|
|
$this->error('当前还没有校区', ['status' => 2]);
|
|
|
$this->error('当前还没有届次', ['status' => 2]);
|
|
|
}
|
|
|
$this->success('项目校区', $data);
|
|
|
$this->success('届次', $data);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* @ApiTitle (场次筛选)
|
|
|
* @ApiMethod (POST)
|
|
|
* @ApiParams (name="cid", type="string", required=false, description="校区id")
|
|
|
* @ApiParams (name="cid", type="string", required=false, description="届次id")
|
|
|
* @ApiReturnParams (name="code", type="integer", required=true, description="状态码")
|
|
|
* @ApiReturnParams (name="msg", type="string", required=true, description="提示语")
|
|
|
* @ApiReturnParams (name="data", type="object", description="扩展数据返回")
|
...
|
...
|
@@ -90,7 +90,7 @@ class Activity extends Api |
|
|
"code":"状态码",
|
|
|
"msg": "提示消息",
|
|
|
"data": {
|
|
|
"campus_title": "校区名称",
|
|
|
"campus_title": "届次名称",
|
|
|
"ronda_title": "场次",
|
|
|
"ronda_holdtime": "场次时间",
|
|
|
}
|
...
|
...
|
@@ -125,7 +125,7 @@ class Activity extends Api |
|
|
"code":"状态码",
|
|
|
"msg": "提示消息",
|
|
|
"data": {
|
|
|
"campus_title": "校区名称",
|
|
|
"campus_title": "届次名称",
|
|
|
"ronda_title": "场次",
|
|
|
"ronda_holdtime": "场次时间",
|
|
|
}
|
...
|
...
|
@@ -189,7 +189,7 @@ class Activity extends Api |
|
|
"code":"状态码",
|
|
|
"msg": "提示消息",
|
|
|
"data": {
|
|
|
"campus_title": "校区名称",
|
|
|
"campus_title": "届次名称",
|
|
|
"ronda_title": "场次名称",
|
|
|
"images": "项目图片",
|
|
|
"details": "项目详情"
|
...
|
...
|
@@ -197,24 +197,18 @@ class Activity extends Api |
|
|
*/
|
|
|
public function getItemDetails()
|
|
|
{
|
|
|
$user = $this->auth->getUserinfo();
|
|
|
$rid = $this->request->param('rid');
|
|
|
$id = $this->request->param('id');
|
|
|
$data = db('item i')
|
|
|
->join('ronda r','i.ronda_id = r.id')
|
|
|
->join('campus c','c.id = r.campus_id')
|
|
|
->field('c.title as campus_title,r.title as ronda_title,r.holdtime,i.details')
|
|
|
->field('c.title as campus_title,r.title as ronda_title,r.holdtime,i.details,i.images')
|
|
|
->where([
|
|
|
'i.ronda_id'=>$rid,
|
|
|
'i.id'=> $id,
|
|
|
])
|
|
|
->find();
|
|
|
$model = new ItemDetails();
|
|
|
$res = db('study')->where('user_id',$user['id'])->find();
|
|
|
if (!empty($res)) {
|
|
|
$list = $model->where(['item_id' => $id, 'team' => $res['team']])->find()->toArray();
|
|
|
$data['images'] = $list['images'];
|
|
|
}
|
|
|
|
|
|
$data['holdtime'] = date('Y-m-d',$data['holdtime']);
|
|
|
$data['details'] = strip_tags($data['details']);
|
|
|
$this->success('获取项目详情成功', $data);
|
...
|
...
|
|