export function arrToIds(arr){
    var new_ids = '';
    for(var i = 0; i < arr.length; i++){
        new_ids += ','+arr[i].id;
    }

    if(new_ids!=''){
        new_ids =  new_ids.substr(1);
    }
    return new_ids;
}

// 时间格式化
export function timeDate(timestamp) {
  var date = new Date(timestamp)
  var Y = date.getFullYear() + '-'
  var M = (date.getMonth() + 1) < 10 ? '0' + (date.getMonth() + 1) + '-' : (date.getMonth() + 1) + '-'
  var D = date.getDate() < 10 ? '0' + date.getDate() + ' ' : date.getDate()
  return Y + M + D
}
