()
| 874 | } |
| 875 | //查询赛跑获得多少积分 |
| 876 | function getWinCoin() { |
| 877 | return new Promise(resolve => { |
| 878 | // const url = `${weAppUrl}/combat/detail/v2?help=false&reqSource=weapp`; |
| 879 | let opt = { |
| 880 | // url: "//jdjoy.jd.com/common/pet/getPetTaskConfig?reqSource=h5", |
| 881 | url: "//draw.jdfcloud.com/common/pet/combat/detail/v2?help=false&reqSource=h5&invokeKey=Oex5GmEuqGep1WLC", |
| 882 | method: "GET", |
| 883 | data: {}, |
| 884 | credentials: "include", |
| 885 | header: {"content-type": "application/json"} |
| 886 | } |
| 887 | const url = "https:"+ taroRequest(opt)['url'] |
| 888 | $.get(taskUrl(url, 'draw.jdfcloud.com', `weapp`), (err, resp, data) => { |
| 889 | try { |
| 890 | if (err) { |
| 891 | console.log('\n京东宠汪汪: API查询请求失败 ‼️‼️') |
| 892 | } else { |
| 893 | // console.log('查询应援团信息API',(data)) |
| 894 | // $.appGetPetTaskConfigRes = JSON.parse(data); |
| 895 | if (data) { |
| 896 | $.getWinCoinRes = JSON.parse(data); |
| 897 | } |
| 898 | } |
| 899 | } catch (e) { |
| 900 | $.logErr(e, resp); |
| 901 | } finally { |
| 902 | resolve(); |
| 903 | } |
| 904 | }) |
| 905 | }) |
| 906 | } |
| 907 | //领取赛跑奖励API |
| 908 | function receiveJoyRunAward() { |
| 909 | return new Promise(resolve => { |
no test coverage detected