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

Function helpdraw

jd_cfd.js:696–722  ·  view source on GitHub ↗
(dwUserId)

Source from the content-addressed store, hash-verified

694 })
695}
696function helpdraw(dwUserId) {
697 return new Promise((resolve) => {
698 $.get(taskUrl(`story/helpdraw`, `dwUserId=${dwUserId}`), (err, resp, data) => {
699 try {
700 if (err) {
701 console.log(`${JSON.stringify(err)}`)
702 console.log(`${$.name} helpdraw API请求失败,请检查网路重试`)
703 } else {
704 data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]);
705 if (data.iRet === 0 || data.sErrMsg === "success") {
706 if (data.Data.StagePrizeInfo) {
707 console.log(`领取助力奖励成功:获得${data.Data.ddwCoin}金币 ${data.Data.StagePrizeInfo.ddwMoney}财富 ${(data.Data.StagePrizeInfo.strPrizeName && !data.Data.StagePrizeInfo.ddwMoney) ? data.Data.StagePrizeInfo.strPrizeName : `0元`}红包`)
708 } else {
709 console.log(`领取助力奖励成功:获得${data.Data.ddwCoin}金币`)
710 }
711 } else {
712 console.log(`领取助力奖励失败:${data.sErrMsg}`)
713 }
714 }
715 } catch (e) {
716 $.logErr(e, resp);
717 } finally {
718 resolve();
719 }
720 })
721 })
722}
723
724// 倒垃圾
725async function queryRubbishInfo() {

Callers 1

getTakeAggrPageFunction · 0.85

Calls 4

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

Tested by

no test coverage detected