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

Function speedUp

jd_cfd_loop.js:233–257  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

231
232// 热气球接客
233async function speedUp() {
234 return new Promise(async (resolve) => {
235 $.get(taskUrl(`user/SpeedUp`, `strBuildIndex=food`), async (err, resp, data) => {
236 try {
237 if (err) {
238 console.log(`${JSON.stringify(err)}`)
239 console.log(`${$.name} SpeedUp API请求失败,请检查网路重试`)
240 } else {
241 data = JSON.parse(data);
242 if (data.iRet === 0) {
243 console.log(`热气球接客成功:已接待 ${data.dwTodaySpeedPeople} 人\n`)
244 } else if (data.iRet === 2027 || data.sErrMsg === '今天接待人数已达上限啦~') {
245 console.log(`热气球接客失败:${data.sErrMsg}\n`)
246 } else {
247 console.log(`热气球接客失败:${data.sErrMsg}\n`)
248 }
249 }
250 } catch (e) {
251 $.logErr(e, resp);
252 } finally {
253 resolve();
254 }
255 })
256 })
257}
258
259// 获取用户信息
260function getUserInfo(showInvite = true) {

Callers 1

cfdFunction · 0.85

Calls 4

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

Tested by

no test coverage detected