Online.php
737 字节
<?php
namespace app\index\controller;
use app\common\controller\Frontend;
use think\Request;
class Online extends Frontend
{
protected $noNeedLogin = '*';
protected $noNeedRight = '*';
protected $layout = '';
public function index()
{
$param=Request::instance()->param();
$menu=self::$model::menu(10);
$list=self::$model::online($param['pid'],10);
$this->assign("left",$menu);
$this->assign("list",$list);
return $this->view->fetch();
}
public function detail()
{
$param=Request::instance()->param();
$news=\app\admin\model\Online::where($param)->find();
$this->assign("news",$news);
return $this->view->fetch();
}
}