计算时间

This commit is contained in:
shijingjing
2022-08-02 09:46:24 +08:00
parent ed0252c4a0
commit a2b19a5f5e

View File

@@ -218,9 +218,8 @@ export default {
this.firstClickTime = new Date(this.detail.remindTime).getTime() || "";
this.currentClickTime = +new Date();
let time = this.currentClickTime - this.firstClickTime;
if (time >= 60 * 60 * 1000 && this.flag) {
if (time >= 3600000 && this.flag) {
console.log(time, 'time');
console.log(60 * 60 * 1000, '60 * 60 * 1000');
console.log(this.flag, 'flag');
this.$http.post("/app/appmasssendingtask/remindSend", null, {
params: {
@@ -236,8 +235,8 @@ export default {
})
.catch(() => {});
} else {
time = 60 * 60 * 1000 - time;
const min = Math.floor(time / 1000 / 60); // 分钟
time = 3600000 - time;
const min = Math.floor(time / 60000); // 分钟
let second = Math.floor(time / 1000); // 秒
second %= 60;
let msg = ``;