格式化日期

pull/30/head
taoshihan1991 4 years ago
parent ff9c1b32d6
commit 0c72f54977

@ -18,7 +18,7 @@ func GetNotice(c *gin.Context) {
info["avator"]=user.Avator
info["name"]=user.Name
info["content"]="欢迎您!有什么我能帮助您的?"
info["time"]=time.Now().String()
info["time"]=time.Now().Format("2006-01-02 15:04:05")
c.JSON(200, gin.H{
"code": 200,
"msg": "ok",

@ -59,7 +59,7 @@ func GetVisitorMessage(c *gin.Context) {
kefu=models.FindUser(message.KefuId)
visitor=models.FindVisitorByVistorId(message.VisitorId)
}
item["time"]=message.CreatedAt
item["time"]=message.CreatedAt.Format("2006-01-02 15:04:05")
item["content"]=message.Content
item["mes_type"]=message.MesType
item["visitor_name"]=visitor.Name

Loading…
Cancel
Save