(body)
| 996 | }) |
| 997 | } |
| 998 | function collectCoin(body) { |
| 999 | return new Promise((resolve) => { |
| 1000 | $.get(taskUrl(`user/CollectCoin`, body), (err, resp, data) => { |
| 1001 | try { |
| 1002 | if (err) { |
| 1003 | console.log(`${JSON.stringify(err)}`) |
| 1004 | console.log(`${$.name} CollectCoin API请求失败,请检查网路重试`) |
| 1005 | } else { |
| 1006 | data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); |
| 1007 | } |
| 1008 | } catch (e) { |
| 1009 | $.logErr(e, resp); |
| 1010 | } finally { |
| 1011 | resolve(data); |
| 1012 | } |
| 1013 | }) |
| 1014 | }) |
| 1015 | } |
| 1016 | function buildLvlUp(body) { |
| 1017 | return new Promise((resolve) => { |
| 1018 | $.get(taskUrl(`user/BuildLvlUp`, body), (err, resp, data) => { |
no test coverage detected