diff --git a/app/admin/model/AdminNotify.php b/app/admin/model/AdminNotify.php index c10bf9b..a17f770 100644 --- a/app/admin/model/AdminNotify.php +++ b/app/admin/model/AdminNotify.php @@ -24,13 +24,13 @@ class AdminNotify extends BaseModel $model = new self; if ($where['start_time'] != "" && $where['end_time'] != "") { - $model = $model->where("add_time","between",[strtotime($where['start_time']." 00:00:00"),strtotime($where['end_time']." 23:59:59")]); + $model = $model->where("create_time","between",[strtotime($where['start_time']." 00:00:00"),strtotime($where['end_time']." 23:59:59")]); } if ($where['title'] != '') $model = $model->where("title|content","like","%$where[title]%"); if ($where['is_read'] != '') $model = $model->where("is_read",$where['is_read']); if ($where['aid'] != '') $model = $model->where("aid",$where['aid']); $model = $model->order("is_read"); - $model = $model->order("add_time desc"); + $model = $model->order("create_time desc"); return $model->paginate(10)->appends($where); } @@ -57,7 +57,7 @@ class AdminNotify extends BaseModel $model = new self; $model = $model->where("is_read",0); $count = self::counts($model); - $model = $model->order("add_time desc"); + $model = $model->order("create_time desc"); $model = $model->page(1,$num); $data = $model->select(); if ($data) $data = $data->toArray(); diff --git a/app/admin/model/DocumentCategory.php b/app/admin/model/DocumentCategory.php index 6dceec6..51426f3 100644 --- a/app/admin/model/DocumentCategory.php +++ b/app/admin/model/DocumentCategory.php @@ -14,9 +14,6 @@ use app\admin\model\BaseModel; */ class DocumentCategory extends BaseModel { - // 开启自动写入时间戳字段 - protected $autoWriteTimestamp = 'datetime'; - /** * 列表 * @param $where diff --git a/app/admin/model/ModelTrait.php b/app/admin/model/ModelTrait.php index cc12827..5df2bfa 100644 --- a/app/admin/model/ModelTrait.php +++ b/app/admin/model/ModelTrait.php @@ -209,7 +209,7 @@ trait ModelTrait * @param string $ceil * @return array */ - public static function getModelTime($where,$model=null,$prefix='add_time',$data='data',$field=' - '){ + public static function getModelTime($where,$model=null,$prefix='create_time',$data='data',$field=' - '){ if ($model == null) $model = new self; if(!isset($where[$data])) return $model; switch ($where[$data]){ diff --git a/app/admin/view/admin_notify/index.html b/app/admin/view/admin_notify/index.html index 93e901e..4f0bf80 100644 --- a/app/admin/view/admin_notify/index.html +++ b/app/admin/view/admin_notify/index.html @@ -75,7 +75,7 @@ diff --git a/app/admin/view/user/index.html b/app/admin/view/user/index.html index e88c01f..b49385d 100644 --- a/app/admin/view/user/index.html +++ b/app/admin/view/user/index.html @@ -13,11 +13,11 @@
- +
- + ~ - +