From 9b3511851cf11ffde57a16f1ef5889c5bcabe8e9 Mon Sep 17 00:00:00 2001 From: cxdbz Date: Mon, 8 Apr 2019 19:53:29 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B1=BB=E5=88=AB=E7=AE=A1=E7=90=86=E7=9A=84?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=B8=8E=E7=BC=96=E8=BE=91=E3=80=81=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E7=AD=9B=E9=80=89=E6=97=B6=E9=A1=B5=E7=A0=81=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/system/controller/Category.php | 19 ++++++++++++++----- application/system/view/category/create.html | 8 ++++---- application/system/view/category/index.html | 11 +++++++---- application/system/view/school/index.html | 5 ++++- public/static/xadmin/js/cjgl.js | 8 ++++++-- 5 files changed, 35 insertions(+), 16 deletions(-) diff --git a/application/system/controller/Category.php b/application/system/controller/Category.php index 272ab01e..2cfb0445 100644 --- a/application/system/controller/Category.php +++ b/application/system/controller/Category.php @@ -124,13 +124,22 @@ class Category extends Base // 编辑类别 public function edit($id) { - // 获取类别信息 - $list = CG::field('id,title,pid,paixu') - ->get($id); + // 获取单位信息 + $list['data'] = CG::field('id,title,pid,paixu') + ->find($id); + // 设置页面标题 + $list['set'] = array( + 'webtitle'=>'编辑类别', + 'butname'=>'修改', + 'formpost'=>'PUT', + 'url'=>'/category/'.$id, + ); + + // 模板赋值 $this->assign('list',$list); - - return $this->fetch(); + // 渲染 + return $this->fetch('create'); } // 更新类别信息 diff --git a/application/system/view/category/create.html b/application/system/view/category/create.html index c035522e..e5e6714e 100644 --- a/application/system/view/category/create.html +++ b/application/system/view/category/create.html @@ -12,15 +12,15 @@
- +
{php} $category = getCategory(0);{/php} - {volist name="category" id="vo"}