更新功能
This commit is contained in:
@@ -6,9 +6,10 @@
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: molong <molong@tensent.cn> <http://www.tensent.cn>
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\controller\admin;
|
||||
|
||||
namespace app\admin\controller;
|
||||
use app\common\controller\Admin;
|
||||
use app\controller\Admin;
|
||||
use app\model\Form as FormM;
|
||||
|
||||
/**
|
||||
* @title 自定义表单
|
||||
@@ -16,33 +17,20 @@ use app\common\controller\Admin;
|
||||
*/
|
||||
class Form extends Admin {
|
||||
|
||||
public function _initialize() {
|
||||
parent::_initialize();
|
||||
$this->model = model('Form');
|
||||
$this->Fattr = model('FormAttr');
|
||||
//遍历属性列表
|
||||
foreach (get_attribute_type() as $key => $value) {
|
||||
$this->attr[$key] = $value[0];
|
||||
}
|
||||
$this->field = $this->getField();
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 表单列表
|
||||
*/
|
||||
public function index() {
|
||||
$map = array();
|
||||
$map = [];
|
||||
|
||||
$order = "id desc";
|
||||
$list = $this->model->where($map)->order($order)->paginate(25, false, array(
|
||||
'query' => $this->request->param()
|
||||
));
|
||||
|
||||
$data = array(
|
||||
$list = FormM::where($map)->order($order)->paginate($this->request->pageConfig);
|
||||
|
||||
$this->data = [
|
||||
'list' => $list,
|
||||
'page' => $list->render(),
|
||||
);
|
||||
$this->setMeta('自定义表单');
|
||||
$this->assign($data);
|
||||
];
|
||||
return $this->fetch();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user