console.log("开始梭哈!")
let pointData = await fetch("https://api.juejin.cn/growth_api/v1/get_cur_point", {
headers: {
"cookie": document.cookie
},
method: 'GET',
credentials: 'include'
}).then(res => {
return res.json();
})
if (pointData.err_no != 0) {
console.log(pointData.err_msg)
}
let point = pointData.data;
if (point < 200) {
console.log("分都不够玩啥玩?")
} else {
let times = parseInt(point / 200);
let arr = [];
for (let i = 0; i < times; i++) {
let result = await fetch("https://api.juejin.cn/growth_api/v1/lottery/draw", {
headers: {
"cookie": document.cookie
},
method: 'POST',
credentials: 'include'
}).then(res => {
return res.json();
})
console.log("获得:"+result.data.lottery_name)
}
}