<%_.each(data, function(item) { var winClass = item.battle_result ? "" : "red"; var resultName = item.battle_result ? "胜利" : "失败"; var champion = item.champion; // 比赛时间转换 var localTime = moment.utc(item.created).toDate(); localTime = moment(localTime).format('YYYY-MM-DD HH:mm:ss'); var timeArr = localTime.split(' '); var monDayArr = timeArr[0].split('-'); var hourMinArr = timeArr[1].split(':'); var time = monDayArr[1] + '-' + monDayArr[2] + ' ' + hourMinArr[0] + ':' + hourMinArr[1]; %>
  • <%=item.game_type.name_cn%>

    <%=time%>

    <%=resultName%>
  • <%});%>