修改连续签到和累计签到奖励领取规则

This commit is contained in:
CounterFire2023 2024-04-13 17:42:21 +08:00
parent 393e9e65c4
commit dd93da8cf7
2 changed files with 3 additions and 3 deletions

View File

@ -156,7 +156,7 @@ class GameController extends BaseController {
throw new ZError(14, 'already claimed') throw new ZError(14, 'already claimed')
} }
const score = totalSignScore(days) const score = seqSignScore(days)
if (score === 0) { if (score === 0) {
throw new ZError(15, 'invalid days') throw new ZError(15, 'invalid days')
} }

View File

@ -14,12 +14,12 @@ for (let i = 0, l = seqSignCfg.length; i < l; i++) {
} }
export const totalSignScore = (days: number) => { export const totalSignScore = (days: number) => {
const data = totalSignCfg2.find(o => days >= o.days) const data = totalSignCfg2.find(o => days === o.days)
return data?.reward || 0 return data?.reward || 0
} }
export const seqSignScore = (days: number) => { export const seqSignScore = (days: number) => {
const data = seqSignCfg2.find(o => days >= o.days) const data = seqSignCfg2.find(o => days === o.days)
return data?.reward || 0 return data?.reward || 0
} }