var message =message:
[ {n:"jerry",a:"static/images/liuyan.jpg",from:"1", to: "10",msg:"在吗555",date:"2010-12-23"},
{n:"jerry",a:"static/images/liuyan.jpg",from:"1", to: "10",msg:"回来了吗",date:"2019-12-23"},
{n:"刘云",a:"static/images/ly.jpg",from:"10", to: "1",msg:"回来了:)",date:"2019-12-3"},
{n:"刘云",a:"static/images/ly.jpg",from:"10", to: "1",msg:"给你带了东西",date:"2019-12-23"},
{n:"刘云",a:"static/images/ly.jpg",from:'10', to: "1",msg:"累死了",date:"2012-1-1"},
{n:"jerry",a:"static/images/liuyan.jpg",from:"1", to: "10",msg:"在吗555bbbbbb",date:"2010-12-23"},
{n:"刘云",a:"static/images/ly.jpg",from:'10', to: "1",msg:"累死了333333",date:"2012-1-1"},
];
拆分为:
var message =message:
[ [{n:"jerry",a:"static/images/liuyan.jpg",from:"1", to: "10",msg:"在吗555",date:"2010-12-23"},
{n:"jerry",a:"static/images/liuyan.jpg",from:"1", to: "10",msg:"回来了吗",date:"2019-12-23"}],
[{n:"刘云",a:"static/images/ly.jpg",from:"10", to: "1",msg:"回来了:)",date:"2019-12-3"},
{n:"刘云",a:"static/images/ly.jpg",from:"10", to: "1",msg:"给你带了东西",date:"2019-12-23"},
{n:"刘云",a:"static/images/ly.jpg",from:'10', to: "1",msg:"累死了",date:"2012-1-1"}],
[{n:"jerry",a:"static/images/liuyan.jpg",from:"1", to: "10",msg:"在吗555bbbbbb",date:"2010-12-23"}],
[{n:"刘云",a:"static/images/ly.jpg",from:'10', to: "1",msg:"累死了333333",date:"2012-1-1"}]
];
每次收到对方的新消息,需要另起一行,如果一直是自己说话,内容还在这行里面。
如何用underscore 实现。