事件本检查时间刷新并推送

This commit is contained in:
luying
2020-10-09 20:26:53 +08:00
parent 50c4aeea2a
commit 2a62b31797
17 changed files with 470 additions and 35 deletions

View File

@@ -11,26 +11,29 @@
}
export function decodeStr(type, str) {
if(str == '&') str = '';
return str.split('|').map(cur => {
let arr = cur.split('&');
let result = {};
switch (type) {
case 'fixReward': {
let [gid, count] = arr;
result = { gid: parseInt(gid), count: parseInt(count)};
break;
if(str == '&') {
return []
} else {
return str.split('|').map(cur => {
let arr = cur.split('&');
let result = {};
switch (type) {
case 'fixReward': {
let [gid, count] = arr;
result = { gid: parseInt(gid), count: parseInt(count)};
break;
}
case 'conditionReward': {
let [gid, count, condition] = arr;
result = { gid: parseInt(gid), count: parseInt(count), condition: parseInt(condition) };
break;
}
case 'randomReward': {
let [gid, count, frequency] = arr;
result = { gid: parseInt(gid), count: parseInt(count), frequency: parseInt(frequency) };
}
}
case 'conditionReward': {
let [gid, count, condition] = arr;
result = { gid: parseInt(gid), count: parseInt(count), condition: parseInt(condition) };
break;
}
case 'randomReward': {
let [gid, count, frequency] = arr;
result = { gid: parseInt(gid), count: parseInt(count), frequency: parseInt(frequency) };
}
}
return result;
});
return result;
});
};
}