{{project.friendlyReminderText}}
@@ -46,9 +48,18 @@ layout("/layouts/platform_h5.html"){
friendlyReminderText: "",
},
baseLoc: "",
+ count: 5,
+ confirmDisabled: true,
}
},
methods: {
+ test(action, done) {
+ if (action === 'confirm' && this.count > 0) {
+ done(false);
+ } else {
+ done();
+ }
+ },
userMessage() {
this.$pjaxReplace("/platform/healthCheckup/h5/userBaseMessage?projectId=" + this.project.id);
},
@@ -77,12 +88,12 @@ layout("/layouts/platform_h5.html"){
let friendlyReminderStatus = sessionStorage.getItem("friendlyReminderStatus");
if (friendlyReminderStatus == "0" ) {
this.show = true;
- let count = 5;
- this.confirmButtonText = '已悉知(' + count + ')'
+ this.confirmButtonText = '已悉知(' + this.count + ')'
let timer = setInterval(() => {
- count--;
- this.confirmButtonText = '已悉知(' + count + ')'
- if (count <= 0) {
+ this.count--;
+ this.confirmButtonText = '已悉知(' + this.count + ')'
+ if (this.count <= 0) {
+ this.confirmDisabled = false;
this.confirmButtonText = '已悉知';
clearInterval(timer);
}