MCPcopy Create free account
hub / github.com/Semporia/Scripts / buildLvlUp

Function buildLvlUp

jd_cfd.js:1016–1033  ·  view source on GitHub ↗
(body)

Source from the content-addressed store, hash-verified

1014 })
1015}
1016function 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}
1034function createbuilding(body, buildNmae) {
1035 return new Promise(async (resolve) => {
1036 $.get(taskUrl(`user/createbuilding`, body), (err, resp, data) => {

Callers 1

getBuildInfoFunction · 0.85

Calls 4

taskUrlFunction · 0.70
getMethod · 0.45
logMethod · 0.45
logErrMethod · 0.45

Tested by

no test coverage detected