From 30dc7d629f5d58c635803b4665a9e18d62a30297 Mon Sep 17 00:00:00 2001 From: toogee Date: Mon, 6 Apr 2020 18:01:17 +0800 Subject: [PATCH] msg --- app/common/model/Message.php | 5 +---- app/common/model/MessageTo.php | 8 +++----- view/index/article/add.html | 3 ++- view/index/article/detail.html | 4 +--- view/index/article/edit.html | 3 ++- view/index/user/message.html | 2 +- 6 files changed, 10 insertions(+), 15 deletions(-) diff --git a/app/common/model/Message.php b/app/common/model/Message.php index 4d09542..2c1c6f7 100644 --- a/app/common/model/Message.php +++ b/app/common/model/Message.php @@ -7,11 +7,8 @@ use think\model\concern\SoftDelete; class Message extends Model { use SoftDelete; - protected $pk = 'id'; //主键 - protected $autoWriteTimestamp = true; //开启自动时间戳 - protected $createTime = 'create_time'; - protected $updateTime = 'update_time'; protected $deleteTime = 'delete_time'; + protected $defaultSoftDelete = 0; //用户关联评论 public function user() diff --git a/app/common/model/MessageTo.php b/app/common/model/MessageTo.php index 1872a9e..faf8718 100644 --- a/app/common/model/MessageTo.php +++ b/app/common/model/MessageTo.php @@ -7,11 +7,9 @@ use think\Db; class MessageTo extends Model { - protected $pk = 'id'; //主键 - protected $autoWriteTimestamp = true; //开启自动时间戳 - protected $createTime = 'create_time'; - protected $updateTime = 'update_time'; - + use SoftDelete; + protected $deleteTime = 'delete_time'; + protected $defaultSoftDelete = 0; //用户关联评论 public function user() { diff --git a/view/index/article/add.html b/view/index/article/add.html index 2f9347a..ef1ac5d 100644 --- a/view/index/article/add.html +++ b/view/index/article/add.html @@ -213,7 +213,7 @@ layui.use('form', function(){ }); {/block} \ No newline at end of file diff --git a/view/index/article/detail.html b/view/index/article/detail.html index e551c89..ff24697 100644 --- a/view/index/article/detail.html +++ b/view/index/article/detail.html @@ -1,10 +1,8 @@ - {extend name="public/base" /} - {block name="title"}{$article.title}-{$sysInfo.webname}{/block} {block name="keywords"}{$article.title},{$article.tags}{/block} {block name="description"}{$article.title},{:getArtContent($article.content)}{/block} -{block name="column"}{include file="/public/column" /}{/block} +{block name="column"}
{include file="/public/column" /}
{/block} {block name="content"}
diff --git a/view/index/article/edit.html b/view/index/article/edit.html index 6674682..93fd1d6 100644 --- a/view/index/article/edit.html +++ b/view/index/article/edit.html @@ -226,7 +226,7 @@ layui.use('form', function(){ {/block} \ No newline at end of file diff --git a/view/index/user/message.html b/view/index/user/message.html index a4daf9d..c9e9d30 100644 --- a/view/index/user/message.html +++ b/view/index/user/message.html @@ -55,7 +55,7 @@ layer.open({ type: 1, skin: 'layui-layer-rim', //加上边框 - area: ['500px', '350px'], //宽高 + area: ['400px', '350px'], //宽高 content: '
'+ res.content +'
' }), othis.next().html('已读');