配置:去除stable服env的特殊处理
This commit is contained in:
@@ -35,20 +35,19 @@ export default class Activity extends Service {
|
||||
let now = new Date();
|
||||
let activity = await ActivityModel.findActivity(activityId);
|
||||
|
||||
if(this.app.config.env == 'production') {
|
||||
if(!activity || (activity.beginTime < now && activity.endTime > now)) {
|
||||
if(!activity || (activity.beginTime < now && activity.endTime > now)) {
|
||||
|
||||
if(activity.type == ACTIVITY_TYPE.SIGN_IN || activity.type == ACTIVITY_TYPE.SIGN_IN_VIP) {
|
||||
// 签到活动的不显示期内也可以编辑
|
||||
let signInObj = new SignInData(activity, 0);
|
||||
if(signInObj.beginTime < now.getTime() && signInObj.endTime > now.getTime() ) {
|
||||
return this.ctx.service.utils.resResult(STATUS.GM_CAN_NOT_EDIT_ACT);
|
||||
}
|
||||
} else {
|
||||
if(activity.type == ACTIVITY_TYPE.SIGN_IN || activity.type == ACTIVITY_TYPE.SIGN_IN_VIP) {
|
||||
// 签到活动的不显示期内也可以编辑
|
||||
let signInObj = new SignInData(activity, 0);
|
||||
if(signInObj.beginTime < now.getTime() && signInObj.endTime > now.getTime() ) {
|
||||
return this.ctx.service.utils.resResult(STATUS.GM_CAN_NOT_EDIT_ACT);
|
||||
}
|
||||
} else {
|
||||
return this.ctx.service.utils.resResult(STATUS.GM_CAN_NOT_EDIT_ACT);
|
||||
}
|
||||
}
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user