Commit 0740b84b by 姜雷

修改计算时间

parent d0af4d3b
...@@ -88,10 +88,13 @@ export default { ...@@ -88,10 +88,13 @@ export default {
}, },
computed: { computed: {
day() { day() {
let sed = let sed = Math.ceil(
new Date(this.selected.endDate) - new Date(this.selected.beginDate); (new Date(this.selected.endDate).getTime() / 1000 / 60 / 60 -
new Date(this.selected.beginDate).getTime() / 1000 / 60 / 60) /
24
);
return Math.ceil(sed / 1000 / 60 / 60 / 24); return sed;
}, },
}, },
created() { created() {
......
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