东东超市添加 开店铺会员卡得蓝币任务(假入会)

This commit is contained in:
lxk0301
2021-01-07 18:08:26 +08:00
parent c6e686e415
commit b5456d1593
2 changed files with 14 additions and 4 deletions

View File

@@ -55,8 +55,8 @@ const JD_API_HOST = 'https://car-member.jd.com/api/';
if (cookiesArr[i]) { if (cookiesArr[i]) {
cookie = cookiesArr[i]; cookie = cookiesArr[i];
$.UserName = decodeURIComponent(cookie.match(/pt_pin=(.+?);/) && cookie.match(/pt_pin=(.+?);/)[1]) $.UserName = decodeURIComponent(cookie.match(/pt_pin=(.+?);/) && cookie.match(/pt_pin=(.+?);/)[1])
console.log(`京东账号${i}`)
$.index = i + 1; $.index = i + 1;
console.log(`京东账号${$.index} ${$.UserName}`)
$.isLogin = true; $.isLogin = true;
$.nickName = ''; $.nickName = '';
message = ''; message = '';

View File

@@ -2,7 +2,7 @@
* @Author: lxk0301 https://github.com/lxk0301 * @Author: lxk0301 https://github.com/lxk0301
* @Date: 2020-08-16 18:54:16 * @Date: 2020-08-16 18:54:16
* @Last Modified by: lxk0301 * @Last Modified by: lxk0301
* @Last Modified time: 2020-11-24 08:22:37 * @Last Modified time: 2021-1-17 18:22:37
*/ */
/* /*
东东超市(活动入口京东APP-》首页-》京东超市-》底部东东超市) 东东超市(活动入口京东APP-》首页-》京东超市-》底部东东超市)
@@ -153,11 +153,11 @@ async function doDailyTask() {
const res = await smtgObtainShopTaskPrize(item.taskId); const res = await smtgObtainShopTaskPrize(item.taskId);
console.log(`\n领取做完任务的奖励${JSON.stringify(res)}\n`) console.log(`\n领取做完任务的奖励${JSON.stringify(res)}\n`)
} }
//做任务
if ((item.type === 1 || item.type === 11) && item.taskStatus === 0) { if ((item.type === 1 || item.type === 11) && item.taskStatus === 0) {
// 分享任务 // 分享任务
const res = await smtgDoShopTask(item.taskId); const res = await smtgDoShopTask(item.taskId);
console.log(`${item.subTitle}结果${JSON.stringify(res)}`) console.log(`${item.subTitle}结果${JSON.stringify(res)}`)
} }
if (item.type === 2) { if (item.type === 2) {
//逛会场 //逛会场
@@ -177,6 +177,15 @@ async function doDailyTask() {
console.log(`${item.subTitle}结果${JSON.stringify(res)}`); console.log(`${item.subTitle}结果${JSON.stringify(res)}`);
} }
} }
if (item.type === 9) {
//开卡领蓝币任务
if (item.taskStatus === 0) {
console.log('开始开卡领蓝币任务')
const itemId = item.content[item.type].itemId;
const res = await smtgDoShopTask(item.taskId, itemId);
console.log(`${item.subTitle}结果${JSON.stringify(res)}`);
}
}
if (item.type === 10) { if (item.type === 10) {
//关注店铺 //关注店铺
if (item.taskStatus === 0) { if (item.taskStatus === 0) {
@@ -751,7 +760,8 @@ function updatePkActivityIdCDN(url = 'https://raw.fastgit.org/lxk0301/updateTeam
function smtgDoShopTask(taskId, itemId) { function smtgDoShopTask(taskId, itemId) {
return new Promise((resolve) => { return new Promise((resolve) => {
const body = { const body = {
"taskId": taskId "taskId": taskId,
"channel": "18"
} }
if (itemId) { if (itemId) {
body.itemId = itemId; body.itemId = itemId;