mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-01 15:32:48 +08:00
新增内容时间格式化
This commit is contained in:
@@ -43,6 +43,12 @@ class Post extends Model
|
||||
$value = $this->getData('publish_time');
|
||||
return date('Y-m-d',$value);
|
||||
}
|
||||
public function getPublishTimeDatetimeAttr()
|
||||
{
|
||||
|
||||
$value = $this->getData('publish_time');
|
||||
return date('Y-m-d H:i:s',$value);
|
||||
}
|
||||
|
||||
public function getCategorysListAttr()
|
||||
{
|
||||
|
||||
@@ -144,7 +144,7 @@
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-form-label">发表时间</div>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="publish_time" value="{$post->publish_time}"
|
||||
<input type="text" name="publish_time" value="{$post->publish_time_datetime}"
|
||||
class="layui-input publish-time">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user