(body)
| 1014 | }) |
| 1015 | } |
| 1016 | function buildLvlUp(body) { |
| 1017 | return new Promise((resolve) => { |
| 1018 | $.get(taskUrl(`user/BuildLvlUp`, body), (err, resp, data) => { |
| 1019 | try { |
| 1020 | if (err) { |
| 1021 | console.log(`${JSON.stringify(err)}`) |
| 1022 | console.log(`${$.name} BuildLvlUp API请求失败,请检查网路重试`) |
| 1023 | } else { |
| 1024 | data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); |
| 1025 | } |
| 1026 | } catch (e) { |
| 1027 | $.logErr(e, resp); |
| 1028 | } finally { |
| 1029 | resolve(data); |
| 1030 | } |
| 1031 | }) |
| 1032 | }) |
| 1033 | } |
| 1034 | function createbuilding(body, buildNmae) { |
| 1035 | return new Promise(async (resolve) => { |
| 1036 | $.get(taskUrl(`user/createbuilding`, body), (err, resp, data) => { |
no test coverage detected