(dwUserId)
| 694 | }) |
| 695 | } |
| 696 | function 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 | // 倒垃圾 |
| 725 | async function queryRubbishInfo() { |
no test coverage detected