活动:签到添加vip标识

This commit is contained in:
qiaoxin
2021-05-15 15:46:26 +08:00
parent 089617b6e9
commit 26de3569f8
2 changed files with 13 additions and 6 deletions

View File

@@ -71,7 +71,7 @@ export class SignInHandler {
}
let openTime = SERVER_OPEN_TIME;
//开服第一个月可以签到之前未领取的奖励,下个月只能签到当天奖励
if (moment(openTime).diff(moment(), 'months') != 1 && (dayIndex != todayIndex)) {
if (moment().diff(moment(openTime).startOf('months'), 'months') != 0 && (dayIndex != todayIndex)) {
return resResult(STATUS.ACTIVITY_SIGNIN_EXPIRE);
}
@@ -96,7 +96,7 @@ export class SignInHandler {
if (!canBuyVip(lv))
return resResult(STATUS.ACTIVITY_SIGNIN_VIP_CONDITION);
if (!await ActivitySignInModel.isBuyVip(activityId, roleId, roundIndex)) {
if (!playerData.isVip) {
return resResult(STATUS.ACTIVITY_SIGNIN_VIP_CONDITION);
}
}