()
| 996 | //可获取开团后的团ID,如果团ID为空并且surplusOpenTuanNum>0,则可继续开团 |
| 997 | //如果团ID不为空,则查询QueryTuan() |
| 998 | function QueryActiveConfig() { |
| 999 | return new Promise((resolve) => { |
| 1000 | const body = `activeId=${escape(tuanActiveId)}&tuanId=`; |
| 1001 | const options = taskTuanUrl(`QueryActiveConfig`, body, `_time,activeId,tuanId`) |
| 1002 | $.get(options, async (err, resp, data) => { |
| 1003 | try { |
| 1004 | if (err) { |
| 1005 | console.log(`${JSON.stringify(err)}`) |
| 1006 | console.log(`${$.name} API请求失败,请检查网路重试`); |
| 1007 | } else { |
| 1008 | if (safeGet(data)) { |
| 1009 | data = JSON.parse(data); |
| 1010 | if (data['ret'] === 0) { |
| 1011 | const { userTuanInfo } = data['data']; |
| 1012 | console.log(`\n团活动ID ${userTuanInfo.activeId}`); |
| 1013 | console.log(`团ID ${userTuanInfo.tuanId}\n`); |
| 1014 | } else { |
| 1015 | console.log(`QueryActiveConfig异常:${JSON.stringify(data)}`); |
| 1016 | } |
| 1017 | } |
| 1018 | } |
| 1019 | } catch (e) { |
| 1020 | $.logErr(e, resp) |
| 1021 | } finally { |
| 1022 | resolve(data); |
| 1023 | } |
| 1024 | }) |
| 1025 | }) |
| 1026 | } |
| 1027 | function QueryTuan(activeId, tuanId) { |
| 1028 | return new Promise((resolve) => { |
| 1029 | const body = `activeId=${escape(activeId)}&tuanId=${escape(tuanId)}`; |
no test coverage detected