活动:添加异常判断
This commit is contained in:
@@ -71,6 +71,13 @@ export class ThirtyDaysHandler {
|
||||
let playerData = await getPlayerThirtyDaysData(activityId, serverId, roleId)
|
||||
if (!playerData) return resResult(STATUS.ACTIVITY_MISSING);
|
||||
|
||||
if (tab > 1) {
|
||||
let item = playerData.findThirtyDaysItem(pageIndex, cellIndex, tab - 1)
|
||||
if (!item.isReceive) {
|
||||
return resResult(STATUS.ACTIVITY_PRE_UNCOMPLETE);
|
||||
}
|
||||
}
|
||||
|
||||
let thirtyDaysItemData: ThirtyDaysItem = playerData.findThirtyDaysItem(pageIndex, cellIndex, tab);
|
||||
if (!thirtyDaysItemData) {
|
||||
return resResult(STATUS.ACTIVITY_DATA_ERROR);
|
||||
|
||||
@@ -362,6 +362,7 @@ export const STATUS = {
|
||||
ACTIVITY_ID_ERROR: { code: 50025, simStr: 'id错误' },
|
||||
ACTIVITY_NEW_PLAYER_GIFT_END: { code: 50026, simStr: '新手活动结束' },
|
||||
ACTIVITY_POP_UP_SHOP_CLOSED: { code: 50027, simStr: '商店已经关闭' },
|
||||
ACTIVITY_PRE_UNCOMPLETE: { code: 50028, simStr: '上一个任务还未领取' },
|
||||
// GM后台相关状态 60000 - 69999
|
||||
GM_ERR_PASSWORD: { code: 60001, simStr: '账号或密码错误' },
|
||||
GM_MISS_API: { code: 60002, simStr: '未找到该接口' },
|
||||
|
||||
Reference in New Issue
Block a user