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

Function QueryTuan

jd_dreamFactory.js:1027–1053  ·  view source on GitHub ↗
(activeId, tuanId)

Source from the content-addressed store, hash-verified

1025 })
1026}
1027function QueryTuan(activeId, tuanId) {
1028 return new Promise((resolve) => {
1029 const body = `activeId=${escape(activeId)}&tuanId=${escape(tuanId)}`;
1030 const options = taskTuanUrl(`QueryTuan`, body, `_time,activeId,tuanId`)
1031 $.get(options, async (err, resp, data) => {
1032 try {
1033 if (err) {
1034 console.log(`${JSON.stringify(err)}`)
1035 console.log(`${$.name} API请求失败,请检查网路重试`);
1036 } else {
1037 if (safeGet(data)) {
1038 data = JSON.parse(data);
1039 if (data['ret'] === 0) {
1040 // $.log(`\n开团情况:${data.data.tuanInfo.realTuanNum}/${data.data.tuanInfo.tuanNum}\n`)
1041 } else {
1042 console.log(`异常:${JSON.stringify(data)}`);
1043 }
1044 }
1045 }
1046 } catch (e) {
1047 $.logErr(e, resp)
1048 } finally {
1049 resolve(data);
1050 }
1051 })
1052 })
1053}
1054//开团API
1055function CreateTuan() {
1056 return new Promise((resolve) => {

Callers 1

tuanActivityFunction · 0.85

Calls 5

taskTuanUrlFunction · 0.70
safeGetFunction · 0.70
getMethod · 0.45
logMethod · 0.45
logErrMethod · 0.45

Tested by

no test coverage detected