活动:修改任务接口
This commit is contained in:
@@ -112,3 +112,26 @@ export async function getPlayerGrowthFundData(activityId: number, serverId: numb
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 购买高阶版
|
||||
*
|
||||
* @param {number} serverId 区Id
|
||||
* @param {number} activityId 活动Id
|
||||
* @param {string} roleId 角色Id
|
||||
* @param {string} productID 商品ID
|
||||
*
|
||||
*/
|
||||
export async function makeGrowthFund(roleId: string, roleName: string, sid: string, serverId: number, funcs: number[],
|
||||
activityId: number, productID: string) {
|
||||
let activityData: ActivityModelType = await ActivityModel.findActivity(activityId);
|
||||
if (!activityData) {
|
||||
return null;
|
||||
}
|
||||
let playerData = new GrowthFundData(activityData);
|
||||
let pageData = playerData.findPageByProductID(productID);
|
||||
let pageIndex = pageData.pageIndex;
|
||||
await ActivityBuyRecordsModel.addRecord(activityId, roleId, activityData.type, pageIndex, true);
|
||||
return Object.assign({}, { item: { pageIndex }, activityId: activityId })
|
||||
}
|
||||
Reference in New Issue
Block a user