From e0d951cc27d9481ee050190ef1da9c1fe32ad48f Mon Sep 17 00:00:00 2001 From: muzi_ys <1099438829@qq.com> Date: Sun, 10 Jul 2022 01:24:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=80=E5=A4=A7=E6=B3=A2=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=92=8C=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/controller/Admin.php | 14 +- app/admin/controller/AdminAuth.php | 4 +- app/admin/controller/AdminLog.php | 2 +- app/admin/controller/AdminRole.php | 6 +- app/admin/controller/Article.php | 21 +- app/admin/controller/Category.php | 14 +- app/admin/controller/Databases.php | 4 +- app/admin/controller/File.php | 16 +- app/admin/controller/FriendLink.php | 4 +- app/admin/controller/Image.php | 6 +- app/admin/controller/Index.php | 16 +- app/admin/controller/Invitation.php | 2 +- app/admin/controller/Login.php | 2 +- app/admin/controller/Message.php | 2 +- app/admin/controller/Nav.php | 5 +- app/admin/controller/Page.php | 12 +- app/admin/controller/SystemConfig.php | 4 +- app/admin/controller/SystemConfigTab.php | 8 +- app/admin/controller/TemplateTrait.php | 2 +- app/admin/controller/Theme.php | 3 +- app/admin/controller/User.php | 4 +- app/admin/view/article/add.html | 16 +- app/admin/view/article/edit.html | 4 +- app/admin/view/category/add.html | 256 ++++----------------- app/admin/view/category/edit.html | 273 +++++------------------ app/common/model/Document.php | 12 +- 26 files changed, 191 insertions(+), 521 deletions(-) diff --git a/app/admin/controller/Admin.php b/app/admin/controller/Admin.php index 1f8037e..9ad03c8 100644 --- a/app/admin/controller/Admin.php +++ b/app/admin/controller/Admin.php @@ -2,21 +2,21 @@ namespace app\admin\controller; +use app\admin\extend\FormBuilder as Form; +use app\admin\extend\Util as Util; use app\common\model\Admin as aModel; use app\common\model\AdminRole as rModel; use app\common\model\User as userModel; use app\Request; -use app\admin\extend\Util as Util; use FormBuilder\Exception\FormBuilderException; use FormBuilder\Factory\Elm; -use app\admin\extend\FormBuilder as Form; use think\db\exception\DataNotFoundException; use think\db\exception\DbException; use think\db\exception\ModelNotFoundException; use think\Exception; use think\facade\Db; -use think\facade\Route as Url; use think\Facade\Log; +use think\facade\Route as Url; /** * 账号管理 @@ -161,7 +161,7 @@ class Admin extends AuthController aModel::insert($data); //添加前台用户 $userId = userModel::addAdminUser($data); - $res = aModel::update(['uid'=>$userId], ['id' => $id]); + $res = aModel::update(['uid' => $userId], ['id' => $id]); } else { $userInfo = aModel::get($id); if ($userInfo['password'] != $data['password']) $data['password'] = md5(md5($data['password'])); @@ -169,12 +169,12 @@ class Admin extends AuthController $data['update_time'] = time(); aModel::update($data, ['id' => $id]); //同步更新前台用户 - $res = userModel::updateAdminUser($userInfo['uid'],$data); + $res = userModel::updateAdminUser($userInfo['uid'], $data); } // 提交事务 Db::commit(); - }catch (Exception $exception){ - Log::error('用户添加失败,失败原因'.$exception->getMessage()); + } catch (Exception $exception) { + Log::error('用户添加失败,失败原因' . $exception->getMessage()); // 回滚事务 Db::rollback(); $res = false; diff --git a/app/admin/controller/AdminAuth.php b/app/admin/controller/AdminAuth.php index f11339e..39bf1dc 100644 --- a/app/admin/controller/AdminAuth.php +++ b/app/admin/controller/AdminAuth.php @@ -2,13 +2,13 @@ namespace app\admin\controller; +use app\admin\extend\FormBuilder as Form; +use app\admin\extend\Util as Util; use app\common\model\AdminAuth as aModel; use app\Request; use Exception; use FormBuilder\Exception\FormBuilderException; -use app\admin\extend\Util as Util; use FormBuilder\Factory\Elm; -use app\admin\extend\FormBuilder as Form; use think\db\exception\DataNotFoundException; use think\db\exception\DbException; use think\db\exception\ModelNotFoundException; diff --git a/app/admin/controller/AdminLog.php b/app/admin/controller/AdminLog.php index b910cdb..c6db8f3 100644 --- a/app/admin/controller/AdminLog.php +++ b/app/admin/controller/AdminLog.php @@ -2,9 +2,9 @@ namespace app\admin\controller; +use app\admin\extend\Util as Util; use app\common\model\AdminLog as lModel; use app\Request; -use app\admin\extend\Util as Util; use Exception; use think\db\exception\DataNotFoundException; use think\db\exception\DbException; diff --git a/app/admin/controller/AdminRole.php b/app/admin/controller/AdminRole.php index d052c3b..a09de4c 100644 --- a/app/admin/controller/AdminRole.php +++ b/app/admin/controller/AdminRole.php @@ -2,13 +2,13 @@ namespace app\admin\controller; -use app\common\model\AdminRole as rModel; +use app\admin\extend\FormBuilder as Form; +use app\admin\extend\Util as Util; use app\common\model\AdminAuth as aModel; +use app\common\model\AdminRole as rModel; use app\Request; use FormBuilder\Exception\FormBuilderException; -use app\admin\extend\Util as Util; use FormBuilder\Factory\Elm; -use app\admin\extend\FormBuilder as Form; use think\db\exception\DataNotFoundException; use think\db\exception\DbException; use think\db\exception\ModelNotFoundException; diff --git a/app/admin/controller/Article.php b/app/admin/controller/Article.php index 8cd91f6..e50b433 100644 --- a/app/admin/controller/Article.php +++ b/app/admin/controller/Article.php @@ -2,18 +2,13 @@ namespace app\admin\controller; +use app\admin\extend\Util as Util; +use app\common\model\Comment as CommentModel; use app\common\model\Document; use app\common\model\DocumentCategory as cModel; -use app\common\model\Tag as TagModel; -use app\common\model\DocumentArticle; -use app\common\model\Comment as CommentModel; -use app\admin\extend\Util as Util; use think\db\exception\DataNotFoundException; use think\db\exception\DbException; use think\db\exception\ModelNotFoundException; -use think\Exception; -use think\facade\Db; -use think\facade\Log; /** * Class Article @@ -73,7 +68,7 @@ class Article extends AuthController * @author 木子的忧伤 * @date 2021-02-28 22:43 */ - public function save($id = "") + public function save() { $data = Util::postMore([ ['id', ''], @@ -98,13 +93,12 @@ class Article extends AuthController ['author', $this->adminInfo['nickname']], ['uid', $this->adminId], ]); - if ($data['title'] == "") return app("json")->fail("文章名称不能为空"); if ($data['category_id'] == "") return app("json")->fail("栏目分类不能为空"); if ($data['cover_path'] == "") return app("json")->fail("主图不能为空"); $model = new Document(); - $res = $model->updateInfo($data,Document::DOCUMENT_TYPE_ARTICLE); - return $res ? app("json")->success("操作成功", 'code') : app("json")->fail("操作失败,错误原因:".$model->getError()); + $res = $model->updateInfo($data, Document::DOCUMENT_TYPE_ARTICLE); + return $res ? app("json")->success("操作成功", 'code') : app("json")->fail("操作失败,错误原因:" . $model->getError()); } @@ -155,14 +149,13 @@ class Article extends AuthController */ public function edit() { - $where = Util::postMore([ - ['name', ''], + $where = Util::getMore([ ['id', ''] ]); if ($where['id'] == '') { $this->error('参数错误'); } - $info = (new Document())->getInfo($where["id"],Document::DOCUMENT_TYPE_ARTICLE); + $info = (new Document())->getInfo($where["id"], Document::DOCUMENT_TYPE_ARTICLE); if (empty($info)) { $this->error('数据不存在'); } diff --git a/app/admin/controller/Category.php b/app/admin/controller/Category.php index 338cd7b..50cc377 100644 --- a/app/admin/controller/Category.php +++ b/app/admin/controller/Category.php @@ -2,11 +2,10 @@ namespace app\admin\controller; +use app\admin\extend\Util as Util; use app\common\constant\Data; use app\common\model\DocumentCategory as aModel; -use app\common\model\DocumentCategoryContent; use app\Request; -use app\admin\extend\Util as Util; use Exception; use think\db\exception\DataNotFoundException; use think\db\exception\DbException; @@ -54,30 +53,29 @@ class Category extends AuthController * @param $id * @return */ - public function save($id = "") + public function save() { $data = Util::postMore([ + ['id', ''], ['title', ''], ['alias', ''], - ['type', ''], ['pid', 0], ['meta_title', ''], ['keywords', ''], ['description', ''], ['template', ''], - ['link_str', ''], ['sort', 0], ['status', 1] ]); if ($data['title'] == "") return app("json")->fail("分类名称不能为空"); - if ($data['type'] == "") return app("json")->fail("类型不能为空"); + if ($data['template'] == "") return app("json")->fail("模板不能为空"); //判断是否写了别名,没写则需要生成 if ($data['alias'] == "") $data['alias'] = get_rand_str(8); - if ($id == "") { + if ($data['id'] == "") { $model = new aModel(); $res = $model->insert($data); } else { - $res = aModel::update($data, ['id' => $id]); + $res = aModel::update($data, ['id' => $data['id']]); } cache(Data::DATA_DOCUMENT_CATEGORY_LIST, null); return $res ? app("json")->success("操作成功", 'code') : app("json")->fail("操作失败"); diff --git a/app/admin/controller/Databases.php b/app/admin/controller/Databases.php index 6077046..9383f30 100644 --- a/app/admin/controller/Databases.php +++ b/app/admin/controller/Databases.php @@ -9,6 +9,8 @@ namespace app\admin\controller; +use app\admin\extend\Util as Util; +use app\common\extend\Database; use app\Request; use Exception; use FilesystemIterator; @@ -16,8 +18,6 @@ use think\db\exception\DataNotFoundException; use think\db\exception\DbException; use think\db\exception\ModelNotFoundException; use think\facade\Db; -use app\common\extend\Database; -use app\admin\extend\Util as Util; /* * 数据库备份还原控制器 diff --git a/app/admin/controller/File.php b/app/admin/controller/File.php index 904f70f..5e7c812 100644 --- a/app/admin/controller/File.php +++ b/app/admin/controller/File.php @@ -3,9 +3,9 @@ namespace app\admin\controller; -use app\common\model\Attachment; use app\admin\extend\storage\QcloudCoService; use app\admin\extend\Util as Util; +use app\common\model\Attachment; use think\db\exception\DataNotFoundException; use think\db\exception\DbException; use think\db\exception\ModelNotFoundException; @@ -32,8 +32,8 @@ class File extends AuthController $saveName = Filesystem::putFile($fileType, $file); $filePath = Filesystem::url($saveName); //转换因为win导致的兼容问题 - if(strtoupper(substr(PHP_OS,0,3))==='WIN'){ - $filePath = str_replace( DIRECTORY_SEPARATOR, '/',$filePath); + if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { + $filePath = str_replace(DIRECTORY_SEPARATOR, '/', $filePath); } break; case 2: @@ -62,8 +62,8 @@ class File extends AuthController if (!file_exists($path)) mkdir($path, 0755, true); $saveName = $path . md5(time()) . ".{$type}"; //转换因为win导致的兼容问题 - if(strtoupper(substr(PHP_OS,0,3))==='WIN'){ - $saveName = str_replace( DIRECTORY_SEPARATOR, '/',$saveName); + if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { + $saveName = str_replace(DIRECTORY_SEPARATOR, '/', $saveName); } if (file_put_contents($saveName, base64_decode(str_replace($result[1], '', $data['image'])))) return app("json")->success("上传成功", ['src' => "/" . $saveName]); else return app("json")->fail("上传失败,写入文件失败!"); @@ -81,7 +81,7 @@ class File extends AuthController if ($request->isPost()) { // 获取表单上传文件 例如上传了001.jpg $file = $this->request->file('file');//根据表单name替换imgFile - $fileType = $this->request->post("type")?:'file'; + $fileType = $this->request->post("type") ?: 'file'; switch ($fileType) { case 'file': $fileSize = 10 * 1024 * 1024; @@ -120,8 +120,8 @@ class File extends AuthController $saveName = Filesystem::putFile($fileType, $file); $filePath = Filesystem::url($saveName); //转换因为win导致的兼容问题 - if(strtoupper(substr(PHP_OS,0,3))==='WIN'){ - $filePath = str_replace( DIRECTORY_SEPARATOR, '/',$filePath); + if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { + $filePath = str_replace(DIRECTORY_SEPARATOR, '/', $filePath); } return $saveName ? app("json")->code()->success("上传成功", ['filePath' => $filePath, "name" => basename($saveName)]) : app("json")->fail("上传失败"); } catch (ValidateException $e) { diff --git a/app/admin/controller/FriendLink.php b/app/admin/controller/FriendLink.php index c5c5648..789891e 100644 --- a/app/admin/controller/FriendLink.php +++ b/app/admin/controller/FriendLink.php @@ -2,11 +2,11 @@ namespace app\admin\controller; +use app\admin\extend\FormBuilder as Form; +use app\admin\extend\Util as Util; use app\common\constant\Data; use app\common\model\FriendLink as aModel; -use app\admin\extend\FormBuilder as Form; use app\Request; -use app\admin\extend\Util as Util; use Exception; use FormBuilder\Exception\FormBuilderException; use FormBuilder\Factory\Elm; diff --git a/app/admin/controller/Image.php b/app/admin/controller/Image.php index 7ebfa65..0faf232 100644 --- a/app/admin/controller/Image.php +++ b/app/admin/controller/Image.php @@ -3,13 +3,13 @@ namespace app\admin\controller; +use app\admin\extend\FormBuilder as Form; +use app\admin\extend\Util as Util; use app\common\model\Attachment; use app\common\model\AttachmentCategory; use Exception; use FormBuilder\Exception\FormBuilderException; use FormBuilder\Factory\Elm; -use app\admin\extend\FormBuilder as Form; -use app\admin\extend\Util as Util; use think\db\exception\DataNotFoundException; use think\db\exception\DbException; use think\db\exception\ModelNotFoundException; @@ -184,7 +184,7 @@ class Image extends AuthController switch ($image['storage']) { case 1: $filePath = app()->getRootPath() . 'public' . $image['path']; - if (file_exists($filePath)){ + if (file_exists($filePath)) { unlink(app()->getRootPath() . 'public' . $image['path']); } break; diff --git a/app/admin/controller/Index.php b/app/admin/controller/Index.php index 5fb68c3..0cc744b 100644 --- a/app/admin/controller/Index.php +++ b/app/admin/controller/Index.php @@ -7,13 +7,13 @@ use app\common\model\Document; use app\common\model\Document as DocumentModel; use app\common\model\DocumentCategory; use app\common\model\DocumentCategory as DocumentCategoryModel; +use app\common\model\FriendLink; use app\common\model\MessageForm; +use app\common\model\User; use Exception; use think\db\exception\DataNotFoundException; use think\db\exception\DbException; use think\db\exception\ModelNotFoundException; -use \app\common\model\User; -use \app\common\model\FriendLink; class Index extends AuthController { @@ -87,7 +87,7 @@ class Index extends AuthController } $str = ''; if ($page == 1) { - if(file_exists('sitemap.xml')) + if (file_exists('sitemap.xml')) unlink('sitemap.xml'); $str .= ''; $str .= ''; @@ -102,7 +102,7 @@ class Index extends AuthController $pagesize = 100; //获取文章分类url - $documentCategoryModel=new DocumentCategoryModel(); + $documentCategoryModel = new DocumentCategoryModel(); $categoryInfo = $documentCategoryModel->field('id,title,create_time') ->where('display', 1)->where('status', 1) ->page($page, $pagesize) @@ -111,14 +111,14 @@ class Index extends AuthController foreach ($categoryInfo as $v) { $str .= ''; $str .= '' . $domain . url('article/lists?id=' . $v['id']) . ''; - $str .= '' . $v['create_time']. ''; + $str .= '' . $v['create_time'] . ''; $str .= 'always'; $str .= '0.8'; $str .= ''; } //获取详细页分类url - $documentModel=new DocumentModel(); - $documentInfo =$documentModel->field('id,create_time') + $documentModel = new DocumentModel(); + $documentInfo = $documentModel->field('id,create_time') ->where('status', 1) ->page($page, $pagesize) ->order('id desc')->select(); @@ -136,7 +136,7 @@ class Index extends AuthController if (!(file_put_contents('sitemap.xml', $str, FILE_APPEND | LOCK_EX))) { $this->error('站点地图更新失败!'); } else { - $this->success('站点地图全部更新完成!', null,'stop'); + $this->success('站点地图全部更新完成!', null, 'stop'); } } //写入 diff --git a/app/admin/controller/Invitation.php b/app/admin/controller/Invitation.php index 1fb1942..0369741 100644 --- a/app/admin/controller/Invitation.php +++ b/app/admin/controller/Invitation.php @@ -2,9 +2,9 @@ namespace app\admin\controller; +use app\admin\extend\Util as Util; use app\common\model\InvitationCode as aModel; use app\Request; -use app\admin\extend\Util as Util; use Exception; use think\db\exception\DataNotFoundException; use think\db\exception\DbException; diff --git a/app/admin/controller/Login.php b/app/admin/controller/Login.php index 17841a6..f878fed 100644 --- a/app/admin/controller/Login.php +++ b/app/admin/controller/Login.php @@ -3,8 +3,8 @@ namespace app\admin\controller; -use app\common\model\Admin as adminModel; use app\admin\extend\Util as Util; +use app\common\model\Admin as adminModel; use Exception; use think\db\exception\DataNotFoundException; use think\db\exception\DbException; diff --git a/app/admin/controller/Message.php b/app/admin/controller/Message.php index 88a6c0a..de88551 100644 --- a/app/admin/controller/Message.php +++ b/app/admin/controller/Message.php @@ -2,9 +2,9 @@ namespace app\admin\controller; +use app\admin\extend\Util as Util; use app\common\model\MessageForm as aModel; use app\Request; -use app\admin\extend\Util as Util; use Exception; use think\db\exception\DataNotFoundException; use think\db\exception\DbException; diff --git a/app/admin/controller/Nav.php b/app/admin/controller/Nav.php index 9969a45..b7f882a 100644 --- a/app/admin/controller/Nav.php +++ b/app/admin/controller/Nav.php @@ -3,17 +3,16 @@ namespace app\admin\controller; use app\admin\extend\FormBuilder as Form; +use app\admin\extend\Util as Util; use app\common\constant\Data; use app\common\model\Nav as aModel; use app\Request; -use app\admin\extend\Util as Util; use Exception; use FormBuilder\Exception\FormBuilderException; use FormBuilder\Factory\Elm; use think\db\exception\DataNotFoundException; use think\db\exception\DbException; use think\db\exception\ModelNotFoundException; -use think\facade\Route as Url; /** * Class Nav @@ -60,7 +59,7 @@ class Nav extends AuthController $form = array(); $form[] = Elm::select('pid', '上级导航', (int)$pid)->options(aModel::returnOptions())->col(10); $form[] = Elm::input('title', '导航名称')->col(10); - // $form[] = Elm::frameInput('icon', '图标', Url::buildUrl('admin/icon/index', array('fodder' => 'icon')))->icon("ios-ionic")->width('96%')->height('390px')->col(10); + // $form[] = Elm::frameInput('icon', '图标', Url::buildUrl('admin/icon/index', array('fodder' => 'icon')))->icon("ios-ionic")->width('96%')->height('390px')->col(10); $form[] = Elm::input('url', '链接地址')->col(10); $form[] = Elm::input('params', '参数')->placeholder("php数组,不懂不要填写")->col(10); $form[] = Elm::number('sort', '排序')->col(10); diff --git a/app/admin/controller/Page.php b/app/admin/controller/Page.php index 9d60487..e88be88 100644 --- a/app/admin/controller/Page.php +++ b/app/admin/controller/Page.php @@ -2,9 +2,9 @@ namespace app\admin\controller; -use app\common\model\Document; -use app\common\model\Comment as CommentModel; use app\admin\extend\Util as Util; +use app\common\model\Comment as CommentModel; +use app\common\model\Document; use think\db\exception\DataNotFoundException; use think\db\exception\DbException; use think\db\exception\ModelNotFoundException; @@ -84,7 +84,7 @@ class Page extends AuthController ['is_recommend', 0], ['is_top', 0], ['is_hot', 0], - ['theme',''], + ['theme', ''], ['link_str', ''], ['cover_path', ''], ['display', 1], @@ -98,8 +98,8 @@ class Page extends AuthController if ($data['theme'] == "") return app("json")->fail("文章模板不能为空"); if ($data['cover_path'] == "") return app("json")->fail("主图不能为空"); $model = new Document(); - $res = $model->updateInfo($data,Document::DOCUMENT_TYPE_PAGE); - return $res ? app("json")->success("操作成功", 'code') : app("json")->fail("操作失败,错误原因:".$model->getError()); + $res = $model->updateInfo($data, Document::DOCUMENT_TYPE_PAGE); + return $res ? app("json")->success("操作成功", 'code') : app("json")->fail("操作失败,错误原因:" . $model->getError()); } @@ -151,7 +151,7 @@ class Page extends AuthController if ($where['id'] == '') { $this->error('数据不存在'); } - $info = (new Document())->getInfo($where["id"],Document::DOCUMENT_TYPE_PAGE); + $info = (new Document())->getInfo($where["id"], Document::DOCUMENT_TYPE_PAGE); if (empty($info)) { $this->error('数据不存在'); } diff --git a/app/admin/controller/SystemConfig.php b/app/admin/controller/SystemConfig.php index 87f7c8e..c930d4e 100644 --- a/app/admin/controller/SystemConfig.php +++ b/app/admin/controller/SystemConfig.php @@ -2,6 +2,8 @@ namespace app\admin\controller; +use app\admin\extend\FormBuilder as Form; +use app\admin\extend\Util as Util; use app\common\constant\Data; use app\common\model\SystemConfig as cModel; use app\common\model\SystemConfigTab as tModel; @@ -9,8 +11,6 @@ use app\Request; use Exception; use FormBuilder\Exception\FormBuilderException; use FormBuilder\Factory\Elm; -use app\admin\extend\FormBuilder as Form; -use app\admin\extend\Util as Util; use Psr\SimpleCache\InvalidArgumentException; use think\db\exception\DataNotFoundException; use think\db\exception\DbException; diff --git a/app/admin/controller/SystemConfigTab.php b/app/admin/controller/SystemConfigTab.php index 705ead2..cd20cd9 100644 --- a/app/admin/controller/SystemConfigTab.php +++ b/app/admin/controller/SystemConfigTab.php @@ -3,13 +3,13 @@ namespace app\admin\controller; +use app\admin\extend\FormBuilder as Form; +use app\admin\extend\Util as Util; +use app\common\model\SystemConfig as cModel; +use app\common\model\SystemConfigTab as tModel; use app\Request; use FormBuilder\Exception\FormBuilderException; use FormBuilder\Factory\Elm; -use app\admin\extend\FormBuilder as Form; -use app\admin\extend\Util as Util; -use app\common\model\SystemConfigTab as tModel; -use app\common\model\SystemConfig as cModel; use think\db\exception\DataNotFoundException; use think\db\exception\DbException; use think\db\exception\ModelNotFoundException; diff --git a/app/admin/controller/TemplateTrait.php b/app/admin/controller/TemplateTrait.php index 712a488..5861dd2 100644 --- a/app/admin/controller/TemplateTrait.php +++ b/app/admin/controller/TemplateTrait.php @@ -2,8 +2,8 @@ namespace app\admin\controller; -use app\Request; use app\admin\extend\Util as Util; +use app\Request; /** * Trait TemplateTrait diff --git a/app/admin/controller/Theme.php b/app/admin/controller/Theme.php index 0d8ef32..fa314f6 100644 --- a/app/admin/controller/Theme.php +++ b/app/admin/controller/Theme.php @@ -2,9 +2,8 @@ namespace app\admin\controller; -use app\common\model\SystemConfig as cModel; -use app\Request; use app\admin\extend\Util as Util; +use app\common\model\SystemConfig as cModel; use Exception; /** diff --git a/app/admin/controller/User.php b/app/admin/controller/User.php index 6229718..a6493d9 100644 --- a/app/admin/controller/User.php +++ b/app/admin/controller/User.php @@ -2,13 +2,13 @@ namespace app\admin\controller; +use app\admin\extend\FormBuilder as Form; +use app\admin\extend\Util as Util; use app\common\model\User as aModel; use app\Request; -use app\admin\extend\Util as Util; use Exception; use FormBuilder\Exception\FormBuilderException; use FormBuilder\Factory\Elm; -use app\admin\extend\FormBuilder as Form; use think\db\exception\DataNotFoundException; use think\db\exception\DbException; use think\db\exception\ModelNotFoundException; diff --git a/app/admin/view/article/add.html b/app/admin/view/article/add.html index 7701688..e7d5960 100644 --- a/app/admin/view/article/add.html +++ b/app/admin/view/article/add.html @@ -23,12 +23,12 @@
- - + +
- - + +
@@ -69,8 +69,8 @@ placeholder="请输入摘要">
- - 标签 +
@@ -113,8 +113,8 @@
- - + +
diff --git a/app/admin/view/article/edit.html b/app/admin/view/article/edit.html index d46ff60..2c9e98d 100644 --- a/app/admin/view/article/edit.html +++ b/app/admin/view/article/edit.html @@ -23,12 +23,12 @@
- +
- +
diff --git a/app/admin/view/category/add.html b/app/admin/view/category/add.html index c29a590..b79ac4c 100644 --- a/app/admin/view/category/add.html +++ b/app/admin/view/category/add.html @@ -3,66 +3,42 @@ 添加分类 - {:system_config('title')}后台管理系统 {include file="public/header" /} - - - -
-
-