活动:月卡过期奖品发放邮件
This commit is contained in:
@@ -142,4 +142,19 @@ export function stringToConsumeParam(rewardStr: string): Array<ItemInter> {
|
||||
result.push({ type: parseInt(type), id: parseInt(id), count: parseInt(count) });
|
||||
}
|
||||
return result
|
||||
}
|
||||
}
|
||||
|
||||
//数据格式转换'id&数量|id&数量|' ->> Array<RewardInter> 老资源格式
|
||||
export function stringToRewardInter(rewardStr: string): Array<RewardInter> {
|
||||
let result = new Array<{ id: number, count: number }>();
|
||||
if (!rewardStr) return result;
|
||||
let decodeArr = decodeArrayListStr(rewardStr);
|
||||
for (let [type, id, count] of decodeArr) {
|
||||
if (isNaN(parseInt(id)) || isNaN(parseInt(count))) {
|
||||
throw new Error('data table format wrong');
|
||||
}
|
||||
result.push({ id: parseInt(id), count: parseInt(count) });
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user