countDown =()=>{
function addZero(time){return time <10?"0"+ time: time +"";}let nightTime =newDate(newDate().toLocaleDateString()).getTime()+24*60*60*1000-1);let newTime =newDate().getTime();let lefttime =parseInt((nightTime- newTime)/1000);// let d = parseInt(lefttime / (24*60*60))let h =parseInt(lefttime /(60*60)%24);let m =parseInt(lefttime /60%60);let s =parseInt(lefttime %60);// d = this.addZero(d)
h =addZero(h);
m =addZero(m);
s =addZero(s);this.setState({
time: `${h}:${m}:${s}`
})setTimeout(this.countDown,1000);}