/**
 * @formateDate  将格林威治时间转换为北京时间格式
 * @date  格林威治标准时间格式
 * @status times:时间戳
 * @return str String  '2022-01-02 14:00:00'   '2022/01/02 14:00:00'
 */
export function formateDate(times, status = 1) {
  const date = new Date(times)
  const y = date.getFullYear()
  let m = date.getMonth() + 1
  let d = date.getDate()
  m = m < 10 ? '0' + m : m
  d = d < 10 ? '0' + d : d

  let str = ''
  if (status === 1 || status === 2) {
    str = `${y}-${m}-${d}`
  }
  return str
}
