diff --git a/application/admin/controller/Menu.php b/application/admin/controller/Menu.php new file mode 100644 index 0000000..bc00d5b --- /dev/null +++ b/application/admin/controller/Menu.php @@ -0,0 +1,139 @@ + + */ +class Menu extends Base { + + public function index(){ + $table = [ + 'tempType' => 'table', + 'header' => [ + [ + 'field' => 'name', + 'info' => '菜单名称' + ], + [ + 'field' => 'url', + 'info' => '菜单URL' + ], + [ + 'field' => 'type', + 'info' => '菜单类型' + ], + [ + 'field' => 'level', + 'info' => '等级' + ], + [ + 'field' => 'hide', + 'info' => '隐藏' + ], + [ + 'field' => 'sort', + 'info' => '排序' + ], + [ + 'field' => 'action', + 'info' => '操作' + ] + ], + 'topButton' => [ + [ + 'href' => 'Menu/add', + 'class'=> 'am-btn-success', + 'info'=> '新增', + 'icon' => 'plus', + 'ajax' => 0, + ], + [ + 'href' => 'Menu/del', + 'class'=> 'am-btn-danger del-all', + 'info'=> '删除', + 'icon' => 'trash', + 'ajax' => 1, + ] + ], + 'rightButton' => [ + [ + 'desc' => '编辑', + 'href' => 'Menu/edit', + 'class'=> 'success', + 'param'=> $this->primaryKey, + 'icon' => 'check', + 'confirm' => 0, + 'show' => '' + ], + [ + 'desc' => '删除', + 'href' => 'Menu/del', + 'class'=> 'danger', + 'param'=> $this->primaryKey, + 'icon' => 'trash', + 'confirm' => 1, + 'show' => '' + ] + ], + 'typeRule' => [ + 'name' => [ + [ + 'module' => 'a', + 'rule' => [ + 'info' => '', + 'href' => 'Menu/add', + 'param'=> $this->primaryKey, + ] + ] + ], + 'hide' => [ + 'module' => 'label', + 'rule' => [ + [ + 'info' => '显示', + 'class' => 'success', + 'show' => ['hide', 1] + ], + [ + 'info' => '隐藏', + 'class' => 'warning', + 'show' => ['hide', 0] + ] + ] + ], + 'type' => [ + 'module' => 'label', + 'rule' => [ + [ + 'info' => '方法类功能', + 'class' => 'secondary', + 'show' => ['type', 0] + ], + [ + 'info' => '模块类功能', + 'class' => 'primary', + 'show' => ['type', 1] + ] + ] + ] + ], + 'data' => [] + ]; + $this->result($table,200); + } + + public function add(){ + + } + + public function edit(){ + + } + + public function del(){ + + } + +} \ No newline at end of file diff --git a/application/admin/model/Menu.php b/application/admin/model/Menu.php new file mode 100644 index 0000000..07e392d --- /dev/null +++ b/application/admin/model/Menu.php @@ -0,0 +1,23 @@ + + */ + +namespace app\admin\model; + + +use think\Model; + +class Menu extends Model { + protected $type = [ + 'fid' => 'integer', + 'type' => 'integer', + 'sort' => 'integer', + 'hide' => 'integer', + 'recommend' => 'integer', + 'level' => 'integer', + ]; + +} \ No newline at end of file diff --git a/application/admin/view/index/index.html b/application/admin/view/index/index.html index 3fa2ddf..0e628d4 100644 --- a/application/admin/view/index/index.html +++ b/application/admin/view/index/index.html @@ -1,9 +1,45 @@ {extend name="public/base" /} -{block name="main"} - +{block name="content"} +
+
+
+ + +
+ + + + + + + + + + + + + + + + + +
+ + TaskProgressLabelbutton
+ + Update software +
+
+
+
+ 55% + + + +
+
+
{/block} {block name="myScript"} - {/block} \ No newline at end of file diff --git a/application/admin/view/public/base.html b/application/admin/view/public/base.html index 3e187d3..3dc01c7 100644 --- a/application/admin/view/public/base.html +++ b/application/admin/view/public/base.html @@ -34,7 +34,7 @@ 7d-vision -