Loading...

thinkphp5.1+layui2.x 时间戳转换为日期格式

layui.use(['table','util'],function(){
var table = layui.table,form = layui.form;
table.render({
elem:"#datatable",
url:"{:url('module/controller/action')}",
cellMinWidth:80,
cols:[[
,{field:'create_time',title:'发布时间', unresize: true,templet: "<div>{{layui.util.toDateString(d.create_time*1000, 'yyyy-MM-dd HH:mm:ss')}}</div>"}
,{field:'update_time',title:'更新时间', unresize: true}
]]
,page:true
})
)}
 

*1000是关键

posted @ 2018-12-04 10:46  awesomego  阅读(1214)  评论(0编辑  收藏  举报