(activeId, tuanId)
| 1025 | }) |
| 1026 | } |
| 1027 | function 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 |
| 1055 | function CreateTuan() { |
| 1056 | return new Promise((resolve) => { |
no test coverage detected