Vod.php 734 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. namespace Video\Lib;
  3. use Dever;
  4. class Vod
  5. {
  6. # 根据id 获取信息
  7. public function get($data)
  8. {
  9. if (!is_array($data)) {
  10. $data = Dever::db('video/vod')->one($data);
  11. }
  12. if (!$data) {
  13. Dever::alert('错误的信息');
  14. }
  15. //embed
  16. return $data;
  17. }
  18. # 获取相关推荐
  19. public function getRelation($info)
  20. {
  21. $where['noid'] = $info['id'];
  22. $where['cate_id'] = $info['cate_id'];
  23. return Dever::db('video/vod')->getRelation($where);
  24. }
  25. # 增加浏览量
  26. public function addView($id)
  27. {
  28. Dever::db('video/vod')->addView($id);
  29. }
  30. }