// 补零
function addZero(m) {
return m < 10 ? "0" + m : m;
}
// 时间戳转date 2022-02-23 12:23:49
export function dealDate(str) {
var time = new Date(str / 1);
var y = time.getFullYear();
var m = time.getMonth() + 1;
var d = time.getDate();
var h = time.getHours();
var mm = time.getMinutes();
var s = time.getSeconds();
const browerType = navigator.userAgent;
console.log("browerType--",browerType);
const linkStr = (browerType.indexOf('Safari') > -1 && browerType.indexOf('Chrome') == -1) ? '/' : '-';
return (
`${y}${linkStr}${addZero(m)}${linkStr}${addZero(d)} ${addZero(h)}:${addZero(mm)}:${addZero(s)}`
);
}