优化项目目录结构
This commit is contained in:
15
app/controller/front/Base.php
Normal file
15
app/controller/front/Base.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?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;
|
||||
|
||||
use \app\Base as BaseC;
|
||||
|
||||
class Base extends BaseC {
|
||||
|
||||
}
|
||||
40
app/controller/front/Index.php
Normal file
40
app/controller/front/Index.php
Normal 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;
|
||||
|
||||
|
||||
class Front extends Base {
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user