data['focus'] = Dever::load('content/meeting-getCur', array('option_info_id' => $this->data['info']['id'], 'option_start' => $time, 'option_end' => $time)); $ids = array(); if ($this->data['focus']) { foreach ($this->data['focus'] as $k => $v) { $this->data['focus'][$k] = $this->one($v); array_push($ids, $v['id']); } } $this->data['meeting'] = Dever::load('content/meeting-getAll', array('option_info_id' => $this->data['info']['id'], 'option_ids' => $ids)); if ($this->data['meeting']) { foreach ($this->data['meeting'] as $k => $v) { $this->data['meeting'][$k] = $this->one($v); } } return $this->data; } /** * @api {get} v1/meeting.view 会议详情 * @apiVersion 1.0.0 * @apiName meeting.view * @apiGroup Data * * @apiDescription 小程序的会议详情接口 * * @apiParam {Number} appid 小程序id * @apiParam {Number} id 会议id * * @apiSuccess {Object[]} info 小程序基本信息 * @apiSuccess {Number} info.id 小程序id * @apiSuccess {String} info.name 小程序名称 * @apiSuccess {Number} info.cate_id 小程序所属栏目id * @apiSuccess {String} info.logo 小程序logo * @apiSuccess {String} info.title 首页标题 * @apiSuccess {String} info.pic 首页头图 * * @apiSuccess {Object[]} meeting 听课信息 * @apiSuccess {Number} meeting.id 听课id * @apiSuccess {String} meeting.name 听课标题 * @apiSuccess {String} meeting.content 听课内容 * @apiSuccess {String} meeting.num_view 阅读数 * @apiSuccess {String} meeting.cdate 时间 * * @apiSuccessExample 操作成功 * {"status":1,"code":1,"msg":"success","data":{"info":{"id":"1","name":"\u7279\u8272\u5c0f\u9547\u600e\u4e48\u641e","cate_id":"1","logo":"http:\/\/192.168.33.10\/plant\/data\/upload\/1\/2018\/03\/24\/1e493a87d4cdddde7fd06ad9762694d2.jpg","title":"test","pic":"http:\/\/192.168.33.10\/plant\/data\/upload\/1\/2018\/03\/24\/da31b5d54d15192fea10406f77f4b0cb.jpg","state":"1","cdate":"1521858466"},"meeting":{"id":"1","name":"\u6d4b\u8bd5","info_id":"1","desc":"\u98a0\u4e09\u5012\u56db","pic":["http:\/\/192.168.33.10\/plant\/data\/upload\/1\/2018\/03\/24\/1e493a87d4cdddde7fd06ad9762694d2.jpg"],"top":"http:\/\/192.168.33.10\/plant\/data\/upload\/1\/2018\/03\/24\/1e493a87d4cdddde7fd06ad9762694d2.jpg","sdate":"1521734400","edate":"1537804800","content":"","reorder":"1","state":"1","cdate":"4\u5206\u949f\u524d"}}} * * @apiErrorExample 操作失败 * {"status":2,"code":1,"msg":"\u9519\u8bef\u7684\u5c0f\u7a0b\u5e8fid"} */ public function view_api() { $id = Dever::input('id'); if ($id > 0) { $news = Dever::load('content/meeting-one', $id); if ($news) { $this->data['meeting'] = $this->one($news); } else { Dever::alert('错误的会议id'); } } else { Dever::alert('错误的会议id'); } return $this->data; } }