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

Function createbuilding

jd_cfd.js:1034–1052  ·  view source on GitHub ↗
(body, buildNmae)

Source from the content-addressed store, hash-verified

1032 })
1033}
1034function createbuilding(body, buildNmae) {
1035 return new Promise(async (resolve) => {
1036 $.get(taskUrl(`user/createbuilding`, body), (err, resp, data) => {
1037 try {
1038 if (err) {
1039 console.log(`${JSON.stringify(err)}`)
1040 console.log(`${$.name} createbuilding API请求失败,请检查网路重试`)
1041 } else {
1042 data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]);
1043 if (data.iRet === 0) console.log(`【${buildNmae}】创建成功`)
1044 }
1045 } catch (e) {
1046 $.logErr(e, resp);
1047 } finally {
1048 resolve();
1049 }
1050 })
1051 })
1052}
1053
1054// 助力
1055function helpByStage(shareCodes) {

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