Example #1
0
 /**
  * 获取活动详细信息
  */
 public function show($id)
 {
     if ($this->get_method() != 'GET') {
         $this->send_response(405, NULL, '请求的方法不存在');
     }
     if (empty($id)) {
         $this->send_response(400, NULL, '400501:活动ID为空');
     }
     $list_user = (int) $this->input->get('list_user', 0);
     $data = $this->model->getEvent($id, $this->user_id);
     if ($data) {
         $event = $this->_arrange_event_item($data, true, $list_user);
         $this->send_response(200, $event);
     }
     $this->send_response(400, NULL, '400502:活动不存在');
 }