✨ feat(37需求): 添加返利数据到活动列表
This commit is contained in:
@@ -45,6 +45,7 @@ import { getPlayerForgeDataShow } from './forgeService';
|
||||
import { getPlayerMiniGameDataShow } from './miniGameService';
|
||||
import { getWeeklyFundDataShow } from './weeklyFundService';
|
||||
import { getMonthlyFundData } from './monthlyFundService';
|
||||
import { getPlayerRebateDataShow } from './rebateService';
|
||||
|
||||
/**
|
||||
* 获取活动数据
|
||||
@@ -256,6 +257,11 @@ export async function getActivity(serverId: number, roleId: string, uid: number,
|
||||
activityData = await getMonthlyFundData(activityId, serverId, roleId);
|
||||
break
|
||||
}
|
||||
case ACTIVITY_TYPE.REBATE:
|
||||
{
|
||||
activityData = await getPlayerRebateDataShow(activityId, serverId, roleId, uid);
|
||||
break
|
||||
}
|
||||
default: {
|
||||
console.log('未知活动类型.........', activityType)
|
||||
break;
|
||||
|
||||
@@ -65,6 +65,7 @@ export enum ACTIVITY_TYPE {
|
||||
BIND_PHONE = 50, // 绑定手机号
|
||||
WEEKLY_FUND = 51, // 周基金
|
||||
MONTHLY_FUND = 52, // 月基金
|
||||
REBATE = 53, // 返利
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -111,7 +111,7 @@ function multiRewards(rewards: string, multi: number) {
|
||||
return arr.map(str => {
|
||||
let [type, id, count] = str.split('&')||[];
|
||||
if(type && id && count) {
|
||||
let _count = Math.floor(parseInt(count) * multi);
|
||||
let _count = Math.ceil(parseInt(count) * multi);
|
||||
if(isNaN(_count)) return null;
|
||||
return `${type}&${id}&${_count}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user