fix: 修复远征部分编译错误

This commit is contained in:
luying
2020-10-15 12:11:18 +08:00
parent 33ee71adcd
commit c5bb06ba7d
6 changed files with 30 additions and 8 deletions

View File

@@ -182,7 +182,7 @@ export function decodeWarJsonAttribute(attribute) {
export async function getPointRewardStatus(roleId: string) {
let role = await RoleModel.findByRoleId(roleId);
let {expeditionPoint} = role;
let {expeditionPoint = 0} = role;
let dicExpeditionPoint = getGamedata('dic_expedition_point');
let pointRewards = {
expeditionPoint,

View File

@@ -329,7 +329,7 @@ export class ExpeditionBattleHandler {
let goods = await rewardObject.saveReward();
return {
code: 202,
code: 200,
data: {
pointRewards,
goods
@@ -352,11 +352,11 @@ export class ExpeditionBattleHandler {
}
let { rewards } = pointStatusInDatabase;
let dicExpeditionPoint = getGamedata('dic_expedition_point');
let flag: boolean, maxPoint = 0;
let flag = true, maxPoint = 0;
for(let dic of dicExpeditionPoint) {
let curReward = rewards.find(cur => cur.point == dic.point);
if(curReward && curReward.received) {
flag = true;
if(!curReward || !curReward.received) {
flag = false;
}
if(dic.point > maxPoint) maxPoint = dic.point;
}