功能模块构建

This commit is contained in:
2020-03-29 22:06:45 +08:00
parent ab21237919
commit b16e4ab920
7 changed files with 234 additions and 54 deletions

View File

@@ -0,0 +1,57 @@
<?php
// +----------------------------------------------------------------------
// | SentCMS [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013 http://www.tensent.cn All rights reserved.
// +----------------------------------------------------------------------
// | Author: molong <molong@tensent.cn> <http://www.tensent.cn>
// +----------------------------------------------------------------------
namespace app\controller\front;
use \app\model\Category;
use \app\model\Model;
use \app\model\Content as ContentModel;
class Content extends Base {
/**
* @title 内容频道页
* @return [type] [description]
*/
public function index() {
return $this->fetch();
}
/**
* @title 内容列表
* @return [type] [description]
*/
public function lists() {
return $this->fetch();
}
/**
* @title 内容专题
* @return [type] [description]
*/
public function topic() {
return $this->fetch();
}
/**
* @title 内容搜索
* @return [type] [description]
*/
public function search() {
return $this->fetch();
}
/**
* @title 内容详情
* @return [type] [description]
*/
public function detail() {
return $this->fetch();
}
}

View File

@@ -0,0 +1,40 @@
<?php
// +----------------------------------------------------------------------
// | SentCMS [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013 http://www.tensent.cn All rights reserved.
// +----------------------------------------------------------------------
// | Author: molong <molong@tensent.cn> <http://www.tensent.cn>
// +----------------------------------------------------------------------
namespace app\controller\front;
use \app\model\Form as FormModel;
use \app\model\FormAttr;
class Form extends Base {
/**
* @title 表单页
* @return [type] [description]
*/
public function index(){
if($this->request->isAjax()){
}else{
$id = $this->request->param('id');
$name = $this->request->param('name');
$map = [];
$map[] = ['id', '=', $id];
$info = Form::where($map)->find();
$this->data = [
'info' => $info
];
return $this->fetch();
}
}
}

View File

@@ -8,33 +8,13 @@
// +----------------------------------------------------------------------
namespace app\controller\front;
use \app\model\Form;
class Index extends Base {
/**
* @title 网站首页
* @return [type] [description]
*/
public function index() {
return $this->fetch();
}
public function form(){
if($this->request->isAjax()){
}else{
$id = $this->request->param('id');
$name = $this->request->param('name');
$map = [];
$map[] = ['id', '=', $id];
$info = Form::where($map)->find();
$this->data = [
'info' => $info
];
return $this->fetch();
}
}
}