Merge branch 'feature/pay_for_diamond' into dev
This commit is contained in:
commit
e660adb95c
@ -8,7 +8,7 @@ export async function playerCanReceive(call: ApiCall) {
|
||||
if (!activityInfo) {
|
||||
return call.error('No such activity');
|
||||
}
|
||||
const remaining = activityInfo.data['remaining'];
|
||||
const remaining = typeof activityInfo.data['remaining'] === 'number'? activityInfo.data['remaining'] : activityInfo.data['totalmoney'];
|
||||
const zeroTime = PublicShared.getToDayZeroTime();
|
||||
const dayPayInfo = await G.mongodb.collection('dayPay').findOne({ uid: call.uid, time: zeroTime });
|
||||
if (!dayPayInfo || !dayPayInfo.payNum) {
|
||||
|
@ -66,7 +66,7 @@ export default async function (call: ApiCall<ReqReceive, ResReceive>) {
|
||||
});
|
||||
}
|
||||
const activityData = canReceiveResult.activityInfo.data;
|
||||
const remaining = activityData['remaining']? activityData['remaining'] : activityData['totalmoney'];
|
||||
const remaining = typeof activityData['remaining'] === 'number'? activityData['remaining'] : activityData['totalmoney'];
|
||||
const { group, maxAmount } = randomWithWeight(activityData['groupConf']['arr']);
|
||||
const gotAmount = calcDiamondGot(remaining, group, maxAmount);
|
||||
// 减去余额
|
||||
|
Loading…
Reference in New Issue
Block a user