
export default {
   // 时间戳转日期
    getDate(val) {
        if (!val) {
            return ""
        }
        let now = new Date(val),
            y = now.getFullYear(),
            m = now.getMonth() + 1,
            d = now.getDate()
        return y + "-" + (m < 10 ? "0" + m : m) + "-" + (d < 10 ? "0" + d : d) + " " + now.toTimeString().substring(0, 8);
    }
}
