export default class CountDownTest extends {
/** @prop {name:label1,tips:"天数",type:Node,default=null} */
label1:any;
/** @prop {name:label2,tips:"小时",type:Node,default=null} */
label2:any;
/** @prop {name:label3,tips:"分钟",type:Node,default=null} */
label3:any;
/** @prop {name:label4,tips:"秒数",type:Node,default=null} */
label4:any;
constructor() { super();
1=null;
2=null;
3=null;
4=null;
}
onAwake(){
();
}
TimeCount(){
var date=new Date();
var now =date.getTime();
var str="2022/7/28 23:59:59";
var endDate=new Date(str);
var end=();
//
var leftTime=end-now;
var d,h,m,s;
if (leftTime>=0) {
d = (leftTime/1000/60/60/24);
h = (leftTime/1000/60/60%24);
m = (leftTime/1000/60%60);
s = (leftTime/1000%60);
}
1.text=d+"";
2.text=h+"h";
3.text=m+"m";
4.text=s+"s";
(1000,this,);
// setTimeout(,1000);
}
countDown(){
}
onEnable(): void {
}
onDisable(): void {
}
}