diff --git a/public/js/client/client.js b/public/js/client/client.js index 9e4ccbf..1bad65b 100644 --- a/public/js/client/client.js +++ b/public/js/client/client.js @@ -7,8 +7,8 @@ $(function(){ function insert_client_html(msg){ var time = dateFormat(); - if(msg.datetime){ - time = dateFormat("yyyy-MM-dd hh:mm:ss",new Date(msg.datetime)); + if(msg.time){ + time = dateFormat("yyyy-MM-dd hh:mm:ss",new Date(msg.time)); } if(!msg.chat_type){ msg.chat_type = 'text'; @@ -38,8 +38,8 @@ $(function(){ function insert_agent_html(msg){ var time = dateFormat(); - if(msg.datetime){ - time = dateFormat("yyyy-MM-dd hh:mm:ss",new Date(msg.datetime)); + if(msg.time){ + time = dateFormat("yyyy-MM-dd hh:mm:ss",new Date(msg.time)); } if(!msg.chat_type){ msg.chat_type = 'text'; diff --git a/public/js/server/index.js b/public/js/server/index.js index 27656e6..feade8c 100644 --- a/public/js/server/index.js +++ b/public/js/server/index.js @@ -52,8 +52,8 @@ layui.use(['layer', 'form', 'jquery'], function () { function insert_agent_html(msg){ var time = dateFormat(); - if(msg.datetime){ - time = dateFormat("yyyy-MM-dd hh:mm:ss",new Date(msg.datetime)); + if(msg.time){ + time = dateFormat("yyyy-MM-dd hh:mm:ss",new Date(msg.time)); } if(!msg.chat_type){ msg.chat_type = 'text'; @@ -83,8 +83,8 @@ layui.use(['layer', 'form', 'jquery'], function () { function insert_client_html(msg){ var time = dateFormat(); - if(msg.datetime){ - time = dateFormat("yyyy-MM-dd hh:mm:ss",new Date(msg.datetime)); + if(msg.time){ + time = dateFormat("yyyy-MM-dd hh:mm:ss",new Date(msg.time)); } if(!msg.chat_type){ msg.chat_type = 'text';