js vue 获取本地时间地方法及计算
let yy = new Date().getFullYear();
let mm = new Date().getMonth()+1;
let dd = new Date().getDate();
let hh = new Date().getHours();
let mf = new Date().getMinutes()<10 ? ‘0’+new Date().getMinutes() : new Date().getMinutes();
let ss = new Date().getSeconds()<10 ? ‘0’+new Date().getSeconds() : new Date().getSeconds();
that.gettime = yy+’-’+mm+’-’+dd+’ ‘+hh+’:’+mf+’:’+ss;
that.gettimes = yy+’-’+mm+’-’+(dd-7)+’ ‘+hh+’:’+mf+’:’+ss;


被折叠的 条评论
为什么被折叠?



