update
This commit is contained in:
@@ -244,7 +244,6 @@ async function JD_XTG(flag = false) {
|
|||||||
await doTask("product", item2["productId"], 2);
|
await doTask("product", item2["productId"], 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//付定金 TODO
|
|
||||||
// for (let item3 of orderSkuList) {
|
// for (let item3 of orderSkuList) {
|
||||||
// await doTask('order', item3['skuId'], 1);
|
// await doTask('order', item3['skuId'], 1);
|
||||||
// await doTask('order', item3['skuId'], 2);
|
// await doTask('order', item3['skuId'], 2);
|
||||||
|
@@ -361,6 +361,7 @@ function shakeBean() {
|
|||||||
}
|
}
|
||||||
//超级摇一摇(此处功能部分京东API抓包自:https://github.com/i-chenzhe/qx/blob/main/jd_shake.js)
|
//超级摇一摇(此处功能部分京东API抓包自:https://github.com/i-chenzhe/qx/blob/main/jd_shake.js)
|
||||||
async function superShakeBean() {
|
async function superShakeBean() {
|
||||||
|
//TODO:此处api貌似可不需cookie调用,待下次活动开启后,进行校验后再优化
|
||||||
await getActInfo();
|
await getActInfo();
|
||||||
if ($.ActInfo) {
|
if ($.ActInfo) {
|
||||||
await fc_getHomeData($.ActInfo);//获取任务列表
|
await fc_getHomeData($.ActInfo);//获取任务列表
|
||||||
@@ -368,7 +369,7 @@ async function superShakeBean() {
|
|||||||
await fc_getHomeData($.ActInfo);//做完任务后查询多少次摇奖次数
|
await fc_getHomeData($.ActInfo);//做完任务后查询多少次摇奖次数
|
||||||
await superShakeLottery($.ActInfo);//开始摇奖
|
await superShakeLottery($.ActInfo);//开始摇奖
|
||||||
} else {
|
} else {
|
||||||
console.log(`京东APP首页超级摇一摇:目前暂无活动`)
|
console.log(`\n\n京东APP首页超级摇一摇:目前暂无活动\n\n`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function getActInfo(url='https://h5.m.jd.com/babelDiy/Zeus/4SXuJSqKganGpDSEMEkJWyBrBHcM/index.html') {
|
function getActInfo(url='https://h5.m.jd.com/babelDiy/Zeus/4SXuJSqKganGpDSEMEkJWyBrBHcM/index.html') {
|
||||||
@@ -386,7 +387,7 @@ function getActInfo(url='https://h5.m.jd.com/babelDiy/Zeus/4SXuJSqKganGpDSEMEkJW
|
|||||||
console.log(`${JSON.stringify(err)}`)
|
console.log(`${JSON.stringify(err)}`)
|
||||||
console.log(`${$.name} API请求失败,请检查网路重试`)
|
console.log(`${$.name} API请求失败,请检查网路重试`)
|
||||||
} else {
|
} else {
|
||||||
data = data.match(/window\.__FACTORY__TAOYIYAO__STATIC_DATA__ = (.*)}/)
|
data = data && data.match(/window\.__FACTORY__TAOYIYAO__STATIC_DATA__ = (.*)}/)
|
||||||
if (data) {
|
if (data) {
|
||||||
data = JSON.parse(data[1] + '}');
|
data = JSON.parse(data[1] + '}');
|
||||||
if (data['taskConfig']) {
|
if (data['taskConfig']) {
|
||||||
@@ -419,11 +420,12 @@ function fc_getHomeData(appId) {
|
|||||||
if (data) {
|
if (data) {
|
||||||
data = JSON.parse(data);
|
data = JSON.parse(data);
|
||||||
if (data && data['data']['bizCode'] === 0) {
|
if (data && data['data']['bizCode'] === 0) {
|
||||||
|
if ($.isNode() && $.index === 1) await notify.sendNotify($.name, `京东APP首页超级摇一摇活再次开启,活动ID:${$.ActInfo}`)
|
||||||
$.taskVos = data['data']['result']['taskVos'].filter(item => !!item && item['status'] === 1) || [];
|
$.taskVos = data['data']['result']['taskVos'].filter(item => !!item && item['status'] === 1) || [];
|
||||||
$.lotteryNum = parseInt(data['data']['result']['lotteryNum']);
|
$.lotteryNum = parseInt(data['data']['result']['lotteryNum']);
|
||||||
$.lotTaskId = parseInt(data['data']['result']['lotTaskId']);
|
$.lotTaskId = parseInt(data['data']['result']['lotTaskId']);
|
||||||
} else if (data && data['data']['bizCode'] === 101) {
|
} else if (data && data['data']['bizCode'] === 101) {
|
||||||
console.log(`获取超级摇一摇: ${data['data']['bizMsg']}`);
|
console.log(`京东APP首页超级摇一摇: ${data['data']['bizMsg']}`);
|
||||||
} else {
|
} else {
|
||||||
console.log(`获取超级摇一摇任务数据异常: ${JSON.stringify(data)}`)
|
console.log(`获取超级摇一摇任务数据异常: ${JSON.stringify(data)}`)
|
||||||
}
|
}
|
||||||
|
@@ -827,7 +827,6 @@ async function doFriendsWater() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
//TODO ,发现bug,github action运行发现有些账号第一次没有给3个好友浇水
|
|
||||||
console.log(`需要浇水的好友列表shareCodes:${JSON.stringify(needWaterFriends)}`);
|
console.log(`需要浇水的好友列表shareCodes:${JSON.stringify(needWaterFriends)}`);
|
||||||
let waterFriendsCount = 0, cardInfoStr = '';
|
let waterFriendsCount = 0, cardInfoStr = '';
|
||||||
for (let index = 0; index < needWaterFriends.length; index ++) {
|
for (let index = 0; index < needWaterFriends.length; index ++) {
|
||||||
|
Reference in New Issue
Block a user