From 35abf3600625e1cfa748b378f06da7de486e8ade Mon Sep 17 00:00:00 2001 From: 1099438829 <1099438829@qq.com> Date: Fri, 5 Mar 2021 10:00:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/controller/Article.php | 6 +++--- app/admin/view/article/edit.html | 4 ++-- public/install/leapy.sql | 2 +- public/template/default/blog.html | 2 +- public/template/default/search.html | 2 +- public/template/default/single-blog.html | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/admin/controller/Article.php b/app/admin/controller/Article.php index fb85893..702fb84 100644 --- a/app/admin/controller/Article.php +++ b/app/admin/controller/Article.php @@ -60,7 +60,7 @@ class Article extends AuthController { $data = Util::postMore([ ['id',''], - ['writer',''], + ['author',''], ['title',''], ['category_id',''], ['type','article'], @@ -82,7 +82,7 @@ class Article extends AuthController if ($data['title'] == "") return app("json")->fail("文章名称不能为空"); if ($data['category_id'] == "") return app("json")->fail("栏目分类不能为空"); if ($data['cover_path'] == "") return app("json")->fail("主图不能为空"); - $data['writer'] = $data['writer']?:$this->adminInfo['nickname']; + $data['author'] = $data['author']?:$this->adminInfo['nickname']; $data['uid'] = $this->adminId; if (!empty($data['content'])){ $content = $data['content']; @@ -94,7 +94,7 @@ class Article extends AuthController if ($data['is_top']) $data['is_top'] = 1; if ($id=="") { - $data['writer'] = $data['writer']?:$this->adminInfo['nickname']; + $data['author'] = $data['author']?:$this->adminInfo['nickname']; $data['create_time'] = time(); $data['update_time'] = time(); $id = aModel::insertGetId($data); diff --git a/app/admin/view/article/edit.html b/app/admin/view/article/edit.html index 206bf14..202bd8b 100644 --- a/app/admin/view/article/edit.html +++ b/app/admin/view/article/edit.html @@ -42,8 +42,8 @@
- - + +
diff --git a/public/install/leapy.sql b/public/install/leapy.sql index 0f79b48..5d6eb11 100644 --- a/public/install/leapy.sql +++ b/public/install/leapy.sql @@ -228,7 +228,7 @@ DROP TABLE IF EXISTS `ape_document`; CREATE TABLE `ape_document` ( `id` int(11) NOT NULL AUTO_INCREMENT, `uid` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '用户ID', - `writer` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '作者', + `author` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '作者', `name` char(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '标识', `title` char(80) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '标题', `category_id` int(10) UNSIGNED NOT NULL COMMENT '所属分类', diff --git a/public/template/default/blog.html b/public/template/default/blog.html index 553365d..ca32ead 100644 --- a/public/template/default/blog.html +++ b/public/template/default/blog.html @@ -63,7 +63,7 @@
diff --git a/public/template/default/search.html b/public/template/default/search.html index 1850e53..298ef98 100644 --- a/public/template/default/search.html +++ b/public/template/default/search.html @@ -64,7 +64,7 @@
diff --git a/public/template/default/single-blog.html b/public/template/default/single-blog.html index a15f9b2..ceaaf2a 100644 --- a/public/template/default/single-blog.html +++ b/public/template/default/single-blog.html @@ -54,7 +54,7 @@