后台:修改服务器状态

This commit is contained in:
luying
2021-12-08 11:58:56 +08:00
parent aec83c1481
commit b51a2839da
9 changed files with 52 additions and 14 deletions
+6 -3
View File
@@ -64,10 +64,13 @@ export default class Serverlist extends BaseModel {
activityGroupId: number[]; // 活动组
public get status() {
if (nowSeconds() > this.openTime) {
return this.serverStatus;
let now = nowSeconds();
if (now < this.openTime) {
return SERVER_STATUS.WILL_OPEN;
} else if (this.maintenance && this.maintenance.isOpen && this.maintenance.startTime < now && this.maintenance.endTime > now) {
return SERVER_STATUS.MAINTENANCE;
} else {
return SERVER_STATUS.WILL_OPEN; // 未开服
return this.serverStatus; // 未开服
}
}