Commit dc4bfeaf by 李嘉林

修改

parent 40ee5a00
...@@ -51,11 +51,14 @@ export default { ...@@ -51,11 +51,14 @@ export default {
return this.datas.componentData.endTime; return this.datas.componentData.endTime;
}, },
endDays() { endDays() {
let today = `${new Date().getFullYear()}/${ let year = new Date().getFullYear();
new Date().getMonth() + 1 let month = (new Date().getMonth() + 1) < 10 ? '0'+(new Date().getMonth() + 1):(new Date().getMonth() + 1);
}/${new Date().getDay()} 00:00:00`; let day = new Date().getDate() < 10 ?'0'+new Date().getDate():new Date().getDate();
let today = `${year}/${month}/${day} 00:00:00`;
console.log(today,'------------58')
let ts = new Date(this.endTime).getTime() - new Date(today).getTime(); //计算剩余的毫秒数 let ts = new Date(this.endTime).getTime() - new Date(today).getTime(); //计算剩余的毫秒数
ts = parseInt(ts / 1000 / 60 / 60 / 24, 10); //计算剩余的天数 ts = parseInt(ts / 1000 / 60 / 60 / 24, 10); //计算剩余的天数
console.log(ts,'----------------------59')
return ts; return ts;
}, },
margin(){ margin(){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment