1.获取时间
today_time: function(t) {
var e = new Date(), a = e.getMonth() + 1, o = e.getDate();
return 1 <= a && a <= 9 && (a = "0" + a), 0 <= o && o <= 9 && (o = "0" + o), e.getFullYear() + "-" + a + "-" + o + " " + e.getHours() + ":" + e.getMinutes() + ":" + e.getSeconds();
},
2.13位时间戳
let that=this;
let t = that.today_time()
let repTime = t.replace(/-/g, '/');
let timeTamp = Date.parse(repTime);
3.10位时间戳
let that=this;
let t = that.today_time()
let repTime = t.replace(/-/g, '/');
let timeTamp = Date.parse(repTime);
let date = timeTamp /1000
网友评论