public function getEventContent($eventId, $uid) { //分别获得用户和照片数据库模型 $user = self::factoryModel('user'); //$photo = self::factoryModel( 'photo' ); $map['id'] = $eventId; $result = $this->where($map)->find(); //检查是否正确的管理员id if ($uid != $result['uid']) { return false; } //追加相册图片 //$result['photolist'] = $photo->getPhotos( $eventId,10 ); //追加参与者和关注者 $join = $att = array(); $att['action'] = 'attention'; $att['eventId'] = $result['id']; $att['status'] = 1; $join = $att; $join['action'] = 'joinIn'; $result['attention'] = $user->getUserList($att, 4); $result['member'] = $user->getUserList($join, 16); $result['lc'] = 5000000 < $result['limitCount'] ? '无限制' : $result['limitCount']; $result['cover'] = getCover($result['coverId'], 200, 200); $result = $this->appendContent($result); return $result; }