功能模块构建
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user