| 360 | }) |
| 361 | } |
| 362 | function smtgHome() { |
| 363 | return new Promise((resolve) => { |
| 364 | $.get(taskUrl('smtg_home'), (err, resp, data) => { |
| 365 | try { |
| 366 | if (err) { |
| 367 | console.log('\n东东超市兑换奖品: API查询请求失败 ‼️‼️') |
| 368 | console.log(JSON.stringify(err)); |
| 369 | } else { |
| 370 | if (safeGet(data)) { |
| 371 | data = JSON.parse(data); |
| 372 | if (data.data.bizCode === 0) { |
| 373 | const { result } = data.data; |
| 374 | $.totalGold = result.totalGold; |
| 375 | $.totalBlue = result.totalBlue; |
| 376 | // console.log(`【总金币】${$.totalGold}个\n`); |
| 377 | console.log(`【总蓝币】${$.totalBlue}个\n`); |
| 378 | } |
| 379 | } |
| 380 | } |
| 381 | } catch (e) { |
| 382 | $.logErr(e, resp); |
| 383 | } finally { |
| 384 | resolve(); |
| 385 | } |
| 386 | }) |
| 387 | }) |
| 388 | } |
| 389 | |
| 390 | //通知 |
| 391 | function msgShow() { |