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

Function doSign

jd_crazy_joy.js:263–287  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

261}
262
263function doSign() {
264 return new Promise(async resolve => {
265 $.get(taskUrl('crazyJoy_task_doSign'), async (err, resp, data) => {
266 try {
267 if (err) {
268 console.log(`${JSON.stringify(err)}`)
269 console.log(`${$.name} API请求失败,请检查网路重试`)
270 } else {
271 if (safeGet(data)) {
272 data = JSON.parse(data);
273 if (data.success && data.data) {
274 console.log(`签到成功,获得${data.data.beans}京豆,${data.data.coins}金币`)
275 } else {
276 console.log(data.message)
277 }
278 }
279 }
280 } catch (e) {
281 $.logErr(e, resp)
282 } finally {
283 resolve();
284 }
285 })
286 })
287}
288
289function doTask(taskId) {
290 let body = {"action": "MARK", "taskId": taskId}

Callers 1

jdCrazyJoyFunction · 0.85

Calls 5

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

Tested by

no test coverage detected