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

Function queryDraw

jd_small_home.js:645–668  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

643}
644//查询免费抽奖机会
645function queryDraw() {
646 return new Promise(resolve => {
647 $.get(taskUrl("ssjj-draw-center/queryDraw"), (err, resp, data) => {
648 try {
649 if (err) {
650 console.log(`${JSON.stringify(err)}`)
651 console.log(`${$.name} API请求失败,请检查网路重试`)
652 } else {
653 if (safeGet(data)) {
654 data = JSON.parse(data);
655 if (data.head.code === 200) {
656 $.freeDrawCount = data.body.freeDrawCount;//免费抽奖次数
657 $.lotteryId = data.body.center.id;
658 }
659 }
660 }
661 } catch (e) {
662 $.logErr(e, resp)
663 } finally {
664 resolve(data);
665 }
666 })
667 })
668}
669//查询是否开启了此活动
670function ssjjRooms() {
671 return new Promise(resolve => {

Callers 1

smallHomeFunction · 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