|
@@ -48,6 +48,10 @@ module.exports = app => {
|
|
|
}
|
|
|
}
|
|
|
if (maintainData.status === status) {
|
|
|
+ if (status === maintainConst.status.ongoing && this.ctx.session !== null) {
|
|
|
+ this.ctx.session = null;
|
|
|
+ throw '系统维护中~';
|
|
|
+ }
|
|
|
return true;
|
|
|
}
|
|
|
const data = {};
|
|
@@ -57,10 +61,9 @@ module.exports = app => {
|
|
|
data.maintain_time = '';
|
|
|
}
|
|
|
const operate = this.db.update(this.tableName, data);
|
|
|
-
|
|
|
- if (status === maintainConst.status.ongoing) {
|
|
|
+ if (status === maintainConst.status.ongoing && this.ctx.session !== null) {
|
|
|
this.ctx.session = null;
|
|
|
- this.ctx.redirect('/');
|
|
|
+ throw '系统维护中~';
|
|
|
}
|
|
|
|
|
|
result = operate.affectedRows > 0;
|