|
@@ -15,16 +15,16 @@ class Page extends Base
|
|
//单页详情
|
|
//单页详情
|
|
public function index()
|
|
public function index()
|
|
{
|
|
{
|
|
- $diyname = $this->request->param('diyname');
|
|
|
|
- if ($diyname && !is_numeric($diyname)) {
|
|
|
|
- $page = PageModel::getByDiyname($diyname);
|
|
|
|
|
|
+ $keyword = $this->request->param('keyword');
|
|
|
|
+ if ($keyword && !is_numeric($keyword)) {
|
|
|
|
+ $page = PageModel::getByDiyname($keyword);
|
|
} else {
|
|
} else {
|
|
- $id = $diyname ? $diyname : $this->request->param('id', '');
|
|
|
|
|
|
+ $id = $keyword ? $keyword : $this->request->param('id', '');
|
|
$page = PageModel::get($id);
|
|
$page = PageModel::get($id);
|
|
}
|
|
}
|
|
- if (!$page || $page['status'] != 'normal') {
|
|
|
|
- $this->error('未找到指定的单页');
|
|
|
|
- }
|
|
|
|
|
|
+ // if (!$page || $page['status'] != 'normal') {
|
|
|
|
+ // $this->error('未找到指定的单页');
|
|
|
|
+ // }
|
|
$page->setInc('views');
|
|
$page->setInc('views');
|
|
$image = $page->getData('image');
|
|
$image = $page->getData('image');
|
|
$fields = explode(',', 'id,title,content,image,description,status,createtime');
|
|
$fields = explode(',', 'id,title,content,image,description,status,createtime');
|