fix some format

This commit is contained in:
luying
2020-12-10 14:12:31 +08:00
parent 3d12e257c4
commit 8af91178bd
2 changed files with 22 additions and 21 deletions

View File

@@ -400,13 +400,13 @@ export function ratioReward(rewardStr: string, ratio: number): string {
}
export function getItems(str:string) {
let arr = [];
let arr = new Array<{id: number, count: number}>();
let strArr = str.split('|');
for (let item of strArr) {
var itemArr = item.split('&');
arr.push({
id : itemArr[0],
count : itemArr[1]
id : parseInt(itemArr[0]),
count : parseInt(itemArr[1])
});
}
return arr;