public function collection()
 {
     $input = I('post.');
     $input['page'] = $input['page'] > 0 ? $input['page'] : 1;
     $collection = new CollectionModel();
     $data = $collection->getCollection($input);
     $this->ajaxReturn(['status' => 0, 'info' => '成功', 'data' => $data]);
 }
 public function collectDate()
 {
     $input = I('post.');
     if (!is_numeric($input['uid']) || !is_numeric($input['date_id'])) {
         $this->ajaxReturn(['status' => 1, 'info' => '非法数据']);
     }
     $collection = new CollectionModel();
     if ($collection->addCollection($input)) {
         $this->ajaxReturn(['status' => 0, 'info' => '成功']);
     } else {
         $this->ajaxReturn(['status' => 1, 'info' => '你已经收藏过此约会']);
     }
 }