页面刷新修改

This commit is contained in:
jjLv 2025-12-16 15:01:17 +08:00
parent a1c8637d10
commit 68ea11b484
1 changed files with 10 additions and 4 deletions

View File

@ -10,10 +10,10 @@
<div class="hourTimeClass"> <div class="hourTimeClass">
<span style="color:#D8E2FF;font-size: 24px;margin-top: 12px;">{{hourTime}}</span> <span style="color:#D8E2FF;font-size: 24px;margin-top: 12px;">{{hourTime}}</span>
</div> </div>
</div> </div>
<div style="height: auto;width: 100%;margin-bottom: 40px;"> <div style="height: auto;width: 100%;margin-bottom: 40px;">
<div class="partthree_title"><span>健康晨检</span></div> <div class="partthree_title"><span>健康晨检</span></div>
<div class="partthree_title2"><div class="fegexian2" style="margin-top: 2px;"></div></div> <div class="partthree_title2"><div class="fegexian2" style="margin-top: 2px;"></div></div>
<div class="contentclass"> <div class="contentclass">
<table style="width: 100%;height: 100%;"> <table style="width: 100%;height: 100%;">
<tr> <tr>
@ -121,7 +121,7 @@ import VueCarousel from 'vue-carousel';
Vue.use(VueCarousel); Vue.use(VueCarousel);
import axios from 'axios'; import axios from 'axios';
import Cookies from 'js-cookie'; import Cookies from 'js-cookie';
import { getCurrentRecipeListApi,getCertificateListApi,getMorningCheckInfoApi } from "@/api/view"; import { getCurrentRecipeListApi, getCertificateListApi, getMorningCheckInfoApi, getTimeStampApi } from '@/api/view'
import * as echarts from 'echarts'; import * as echarts from 'echarts';
export default { export default {
@ -361,6 +361,12 @@ export default {
}); });
}, },
getCurrentTime() { getCurrentTime() {
//20251110:10:10
if (this.sysTime < 1735697410000){
this.$message.error("时间异常,页面即将刷新!");
window.location.reload(true);
return;
}
this.countTime = this.countTime+1000; this.countTime = this.countTime+1000;
var nowTime = this.countTime+this.sysTime var nowTime = this.countTime+this.sysTime
const now = new Date(nowTime); const now = new Date(nowTime);
@ -581,7 +587,7 @@ export default {
width: 100%; width: 100%;
justify-content: center; justify-content: center;
flex-wrap: wrap; flex-wrap: wrap;
color:#fff; color:#fff;
} }
.fegexian{ .fegexian{
width: 50%; width: 50%;