部署生产定时任务
This commit is contained in:
@@ -470,41 +470,62 @@ const setViewsIncrease = (value: any) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
let upgradeList = ["/feedbackSurvey", "/feedbackSurveyCN", "emailVerify"]; //指定页面系统维护也可以访问
|
let upgradeList = ["/feedbackSurvey", "/feedbackSurveyCN", "emailVerify"]; //指定页面系统维护也可以访问
|
||||||
|
function isTimeRangePassed(timeRange) {
|
||||||
|
const [startStr, endStr] = timeRange.split(' - ');
|
||||||
|
const startTime = new Date(startStr).getTime();
|
||||||
|
const endTime = new Date(endStr).getTime();
|
||||||
|
const currentTime = new Date().getTime();
|
||||||
|
|
||||||
|
if (currentTime < startTime) {
|
||||||
|
return 'not_started'; // 未开始
|
||||||
|
} else if (currentTime >= startTime && currentTime <= endTime) {
|
||||||
|
return 'in_progress'; // 进行中
|
||||||
|
} else {
|
||||||
|
return 'ended'; // 已结束
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
router.beforeEach((to: any, from, next) => {
|
router.beforeEach((to: any, from, next) => {
|
||||||
// 系统维护
|
//系统维护时间
|
||||||
// const toName = to.name === 'upgrade';
|
const time = '2025-10-15T22:00:00 - 2025-10-15T23:00:00';
|
||||||
// if(upgradeList.indexOf(to.path) > -1){
|
if (isTimeRangePassed(time) == 'in_progress') {
|
||||||
// next();
|
// 系统维护
|
||||||
// }else{
|
const toName = to.name === 'upgrade';
|
||||||
// if (toName) {
|
if(upgradeList.indexOf(to.path) > -1){
|
||||||
// next();
|
next();
|
||||||
// } else {
|
}else{
|
||||||
// next({ name: 'upgrade' });
|
if (toName) {
|
||||||
// }
|
next();
|
||||||
// }
|
} else {
|
||||||
// return
|
next({ name: 'upgrade' });
|
||||||
// 机房用户
|
}
|
||||||
let herfData = window.location.search.substring(1);
|
}
|
||||||
if (herfData.split("=")[0] == "noLogin" && to.name != "homePage") {
|
} else {
|
||||||
setMurmur(herfData.split("=")[1]);
|
|
||||||
return;
|
// 机房用户
|
||||||
}
|
let herfData = window.location.search.substring(1);
|
||||||
let affiliateRef = sessionStorage.getItem("affiliateRef");
|
if (herfData.split("=")[0] == "noLogin" && to.name != "homePage") {
|
||||||
if (to.query.order) sessionStorage.setItem("orderId", to.query.order); //记录是否点击跳转订单链接
|
setMurmur(herfData.split("=")[1]);
|
||||||
if (to.query.ref && affiliateRef != to.query.ref)
|
return;
|
||||||
setViewsIncrease(to.query.ref);
|
}
|
||||||
|
let affiliateRef = sessionStorage.getItem("affiliateRef");
|
||||||
|
if (to.query.order) sessionStorage.setItem("orderId", to.query.order); //记录是否点击跳转订单链接
|
||||||
|
if (to.query.ref && affiliateRef != to.query.ref)
|
||||||
|
setViewsIncrease(to.query.ref);
|
||||||
|
|
||||||
|
var vuex_systemList: any = sessionStorage.getItem("vuex_systemList");
|
||||||
var vuex_systemList: any = sessionStorage.getItem("vuex_systemList");
|
if (to.meta.enter == "all") {
|
||||||
if (to.meta.enter == "all") {
|
next();
|
||||||
next();
|
} else if (
|
||||||
} else if (
|
(state.UserHabit?.userDetail?.systemList?.indexOf(to.meta.enter) > -1) || (vuex_systemList?.indexOf(to.meta.enter))
|
||||||
(state.UserHabit?.userDetail?.systemList?.indexOf(to.meta.enter) > -1) || (vuex_systemList?.indexOf(to.meta.enter))
|
) {
|
||||||
) {
|
next();
|
||||||
next();
|
} else {
|
||||||
} else {
|
next("/404");
|
||||||
next("/404");
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// if(systemUser == 0){//游客用户只能进入这两个页面
|
// if(systemUser == 0){//游客用户只能进入这两个页面
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -8,15 +8,15 @@
|
|||||||
<!-- <div class="upgrade-content-text">System upgrading</div> -->
|
<!-- <div class="upgrade-content-text">System upgrading</div> -->
|
||||||
<div class="upgrade-content-text">System maintenance</div>
|
<div class="upgrade-content-text">System maintenance</div>
|
||||||
<!-- 没有截至时间 -->
|
<!-- 没有截至时间 -->
|
||||||
<!-- <div class="upgrade-content-textab">The AiDA system cannot be accessed temporarily due to system server maintenance. We apologize for any inconvenience this may cause and thank you for your understanding.</div> -->
|
<div class="upgrade-content-textab">The AiDA system cannot be accessed temporarily due to system server maintenance. We apologize for any inconvenience this may cause and thank you for your understanding.</div>
|
||||||
<!-- <div class="upgrade-content-textab">Due to the system server upgrade, we will start the upgrade from 9:30 am Hong Kong time on the weekend of October 20th until October 21st. During this time,<br> the AiDA system will be temporarily inaccessible. We apologize for any inconvenience this may cause and thank you for your understanding.</div> -->
|
<!-- <div class="upgrade-content-textab">Due to the system server upgrade, we will start the upgrade from 9:30 am Hong Kong time on the weekend of October 20th until October 21st. During this time,<br> the AiDA system will be temporarily inaccessible. We apologize for any inconvenience this may cause and thank you for your understanding.</div> -->
|
||||||
<!-- 有截至时间 -->
|
<!-- 有截至时间 -->
|
||||||
<div class="upgrade-content-textab">Due to system server upgrades, we will be upgrading from Tuesday, September 2 at 00:00 (HKT) to Wednesday, September 3 at 00:00. During this period, the AiDA system will be temporarily inaccessible. <br>We sincerely apologize for the inconvenience caused and thank you for your understanding</div>
|
<!-- <div class="upgrade-content-textab">Due to system server upgrades, we will be upgrading from Tuesday, September 2 at 00:00 (HKT) to Wednesday, September 3 at 00:00. During this period, the AiDA system will be temporarily inaccessible. <br>We sincerely apologize for the inconvenience caused and thank you for your understanding</div> -->
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<!-- <div class="upgrade-content-textab">由于系统服务器维护,AiDA系统暂时无法访问。对于由此造成的任何不便,我们深表歉意,并感谢您的理解</div> -->
|
<div class="upgrade-content-textab">由于系统服务器维护,AiDA系统暂时无法访问。对于由此造成的任何不便,我们深表歉意,并感谢您的理解</div>
|
||||||
<div class="upgrade-content-textab">由于系统服务器升级,我们将于9月2日(星期二)凌晨00:00(香港时间)至9月3日(星期三)凌晨00:00进行升级。<br>在此期间,AiDA系统将暂时无法访问。给您带来的不便,我们深表歉意,并感谢您的理解</div>
|
<!-- <div class="upgrade-content-textab">由于系统服务器升级,我们将于9月2日(星期二)凌晨00:00(香港时间)至9月3日(星期三)凌晨00:00进行升级。<br>在此期间,AiDA系统将暂时无法访问。给您带来的不便,我们深表歉意,并感谢您的理解</div> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user