活动:添加返回参数

This commit is contained in:
qiaoxin
2021-05-26 16:24:10 +08:00
parent 064b3258fe
commit 6289c593ae
3 changed files with 13 additions and 6 deletions

View File

@@ -102,7 +102,12 @@ export class LimitPackageHandler {
let result = await addReward(roleId, roleName, sid, serverId, funcs, rewardArray);
await ActivityShopModel.addRecord(activityId, roleId, roundIndex, id);
return resResult(STATUS.SUCCESS, Object.assign(result, {}));
item.buyCount += 1;
return resResult(STATUS.SUCCESS, Object.assign(result, {
param: { activityId, roundIndex, id },
item: item
}));
}
}

View File

@@ -45,7 +45,9 @@ export class MonthlyTicketHandler {
let result = await getPlayerMonthlyTicketDayReward(roleId, roleName, sid, serverId, funcs, activityId)
if (result) {
return resResult(STATUS.SUCCESS, result);
return resResult(STATUS.SUCCESS, Object.assign(result, {
param: { activityId },
}));
}
return resResult(STATUS.NO_MOTHLY_TICKET_REWARD);
}

View File

@@ -181,11 +181,11 @@ export class GrowthData extends ActivityBase {
let index = data.findIndex(record => { return obj.dayIndex == record.dayIndex && obj.cellIndex == record.cellIndex })
if (index != -1) {
obj.totalCount = data[index].totalCount ? data[index].totalCount : 0;
obj.receiveRewardCount = data[index].receiveRewardCount ? data[index].receiveRewardCount : 0;
} else {
if (obj.taskType === TASK_TYPE.HERO_NUM) {
obj.totalCount = heroNum;
}
}
if (obj.taskType === TASK_TYPE.HERO_NUM) {
obj.totalCount = heroNum;
}
}
}