拉斯维加斯3499进入网站(中国)官方网站

数据不存在

[0] HttpException in News.php line 88

查看错误代码
  1. public function detail()
  2. {
  3. $where=UtilService::getMore([
  4. ['id',0],
  5. ]);
  6. $info=NewsModel::where(['is_del'=>0,'is_show'=>1,'id'=>$where['id']])->find();
  7. if(!$info)
  8. {
  9. throw new \think\exception\HttpException(404, '数据不存在');
  10. die;
  11. }
  12. $info=$info->toArray();
  13. $info['cat_name']=NewsCategory::where('id',$info['cat_id'])->value('title');
  14. $this->assign('info',$info);
  15. $pre=NewsModel::where(['is_del'=>0,'is_show'=>1])->field('id,title')->where('show_time','<',$info['show_time'])->order('show_time desc')->find();
  16. if($pre)
  17. $pre=$pre->toArray();