功能模块构建
This commit is contained in:
40
app/controller/front/Form.php
Normal file
40
app/controller/front/Form.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 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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user