测试一下

This commit is contained in:
shijingjing
2022-08-02 17:30:56 +08:00
parent 4a22893b44
commit 7372155487

View File

@@ -198,42 +198,42 @@ export default {
}, },
// 提醒发送 // 提醒发送
remindSend() { remindSend() {
wx.getSystemInfo({ uni.getSystemInfo({
success (res) { success: function (res) {
console.log(res.model) console.log(res)
} }
}) });
this.firstClickTime = new Date(this.detail.remindTime.replace(/-/g, "/")).getTime() || new Date(this.detail.remindTime).getTime() || 0 ; // this.firstClickTime = new Date(this.detail.remindTime.replace(/-/g, "/")).getTime() || new Date(this.detail.remindTime).getTime() || 0 ;
this.currentClickTime = +new Date(); // this.currentClickTime = +new Date();
let time = this.currentClickTime - this.firstClickTime; // let time = this.currentClickTime - this.firstClickTime;
if (time >= 3600000) { // if (time >= 3600000) {
this.$http.post("/app/appmasssendingtask/remindSend", null, { // this.$http.post("/app/appmasssendingtask/remindSend", null, {
params: { // params: {
id: this.id, // id: this.id,
}, // },
}) // })
.then((res) => { // .then((res) => {
if (res?.code == 0) { // if (res?.code == 0) {
this.$u.toast("已提醒成员发送"); // this.$u.toast("已提醒成员发送");
this.getDetail() // this.getDetail()
} // }
}) // })
.catch(() => {}); // .catch(() => {});
} else { // } else {
time = 3600000 - time; // time = 3600000 - time;
const min = Math.floor(time / 60000); // 分钟 // const min = Math.floor(time / 60000); // 分钟
let second = Math.floor(time / 1000); // 秒 // let second = Math.floor(time / 1000); // 秒
second %= 60; // second %= 60;
let msg = ``; // let msg = ``;
if (min > 0 && second > 0) { // if (min > 0 && second > 0) {
msg = `${min}分钟${second}秒后可以再次点击`; // msg = `${min}分钟${second}秒后可以再次点击`;
} else if (min > 0 && second <= 0) { // } else if (min > 0 && second <= 0) {
msg = `${min}分钟后可以再次点击`; // msg = `${min}分钟后可以再次点击`;
} else if (min <= 0 && second > 0) { // } else if (min <= 0 && second > 0) {
msg = `${second}秒后可以再次点击`; // msg = `${second}秒后可以再次点击`;
} // }
this.$u.toast(msg); // this.$u.toast(msg);
} // }
}, },
// 切换分段器 // 切换分段器
changeSub0(index) { changeSub0(index) {