diff --git a/application/system/controller/SystemBase.php b/application/system/controller/SystemBase.php index a724f9eb..37305b20 100644 --- a/application/system/controller/SystemBase.php +++ b/application/system/controller/SystemBase.php @@ -10,48 +10,72 @@ use app\system\model\SystemBase as sysbasemod; class SystemBase extends Base { - /** - * 显示资源列表 - * - * @return \think\Response - */ + // 系统设置 public function index() { - //实例化数据模型 - $sysbasemod = new sysbasemod(); + $count = 1; - // 查询最新记录 - $list = $sysbasemod - ->order(['id'=>'desc']) - ->field('keywords,description') - ->limit(1) - ->find(); + // 设置要给模板赋值的信息 + $list['title'] = '系统设置'; + $list['count'] = $count; - // 模版赋值 + // 模板赋值 $this->assign('list',$list); - - // 渲染输出 + + // 渲染模板 return $this->fetch(); } - /** - * 显示编辑资源表单页. - * - * @param int $id - * @return \think\Response - */ - public function edit($id) + + + // 系统设置列表 + public function ajaxData() { - // + // 获取DT的传值 + $getdt = request()->param(); + + //得到排序的方式 + $order = $getdt['order'][0]['dir']; + //得到排序字段的下标 + $order_column = $getdt['order'][0]['column']; + //根据排序字段的下标得到排序字段 + $order_field = $getdt['columns'][$order_column]['data']; + //得到limit参数 + $limit_start = $getdt['start']; + $limit_length = $getdt['length']; + //得到搜索的关键词 + $search = $getdt['search']['value']; + + + // 获取记录集总数 + $cnt = 1; + //查询数据 + $data = sysbasemod::field('id,title,keywords,description,copyright,thinks,danwei') + ->order([$order_field=>$order]) + // ->limit(1,1) + ->select(); + + $datacnt = 1; + + $data = [ + 'draw'=> $getdt["draw"] , // ajax请求次数,作为标识符 + 'recordsTotal'=>$datacnt, // 获取到的结果数(每页显示数量) + 'recordsFiltered'=>$cnt, // 符合条件的总数据量 + 'data'=>$data, //获取到的数据结果 + ]; + + return json($data); } - /** - * 保存更新的资源 - * - * @param \think\Request $request - * @param int $id - * @return \think\Response - */ + + + // 编辑系统设置 + public function edit($id) + { + return 'aa'; + } + + // 更新资源 public function update(Request $request, $id) { // diff --git a/application/system/view/system_base/create.html b/application/system/view/system_base/create.html new file mode 100644 index 00000000..22f99691 --- /dev/null +++ b/application/system/view/system_base/create.html @@ -0,0 +1,117 @@ +{extend name="common@create" /} +{block name="formaa"} +
+{/block} +{block name="yanzheng"} + +{/block} \ No newline at end of file diff --git a/application/system/view/system_base/edit.html b/application/system/view/system_base/edit.html new file mode 100644 index 00000000..28aa393f --- /dev/null +++ b/application/system/view/system_base/edit.html @@ -0,0 +1,114 @@ +{extend name="common@create" /} +{block name="formaa"} + +{/block} +{block name="yanzheng"} + +{/block} \ No newline at end of file diff --git a/application/system/view/system_base/index.html b/application/system/view/system_base/index.html index 7bdcfc24..468db4f2 100644 --- a/application/system/view/system_base/index.html +++ b/application/system/view/system_base/index.html @@ -1,200 +1,71 @@ - - - - - - - - - - - - -{css href="/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/css/H-ui.min.css" /} -{css href="/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/css/H-ui.admin.css" /} -{css href="/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/Hui-iconfont/1.0.8/iconfont.css" /} -{css href="/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/default/skin.css" id="skin" /} -{css rel="stylesheet" type="text/css" href="/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/css/style.css" /} - - - -| 标题 | +关键字 | +描述 | +版权 | +感谢 | +单位 | +操作 | +
|---|