mirror of
https://github.com/shufflewzc/faker2.git
synced 2025-04-23 02:48:44 +08:00
update
This commit is contained in:
parent
1173108bd4
commit
e053f79e72
24
jd_cjzdgf.js
24
jd_cjzdgf.js
File diff suppressed because one or more lines are too long
33
jd_jinggengjcq_dapainew.js
Executable file
33
jd_jinggengjcq_dapainew.js
Executable file
File diff suppressed because one or more lines are too long
30
jd_jinggengjcq_dapainew_task.js
Executable file
30
jd_jinggengjcq_dapainew_task.js
Executable file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
26
jd_lzdz1_dapai.js
Executable file
26
jd_lzdz1_dapai.js
Executable file
File diff suppressed because one or more lines are too long
212
jd_wx_centerDraw.js
Normal file
212
jd_wx_centerDraw.js
Normal file
@ -0,0 +1,212 @@
|
||||
/*
|
||||
7 7 7 7 7 jd_wx_centerDraw.js
|
||||
*/
|
||||
let mode = __dirname.includes('magic')
|
||||
const {Env} = mode ? require('./magic') : require('./magic')
|
||||
const $ = new Env('M老虎机抽奖');
|
||||
$.lz = 'LZ_TOKEN_KEY=lztokef1eb8494b0af868bd18bdaf8;LZ_TOKEN_VALUE=Aa5RE8RuY4X3zA==;';
|
||||
$.activityUrl = process.env.M_WX_CENTER_DRAW_URL
|
||||
? process.env.M_WX_CENTER_DRAW_URL
|
||||
: '';
|
||||
if (mode) {
|
||||
$.activityUrl = 'https://lzkj-isv.isvjcloud.com/lzclient/8e5f3ebaf6e545959aa6311d14be5dfa/cjwx/common/entry.html?activityId=8e5f3ebaf6e545959aa6311d14be5dfa&gameType=wxTurnTable'
|
||||
// $.activityUrl = 'https://lzkj-isv.isvjcloud.com/wxDrawActivity/activity?activityId=37c4c35255a84522bc944974edeef960'
|
||||
// $.activityUrl = 'https://lzkj-isv.isvjcloud.com/wxDrawActivity/activity?activityId=1155ac7d4ec74a8ba31238d846866599'
|
||||
$.activityUrl = 'https://lzkj-isv.isvjcloud.com/wxDrawActivity/activity?activityId=a5b7b7b8196e4dc192c4ffd3221a7866'
|
||||
$.activityUrl = 'https://lzkj-isv.isvjcloud.com/drawCenter/activity/75f5617c3c844163b8ccb1b410eb23e8?activityId=75f5617c3c844163b8ccb1b410eb23e8'
|
||||
$.activityUrl = 'https://lzkj-isv.isvjcloud.com/drawCenter/activity?activityId=7113c86ee0b94fbbb803a76c8bda6065'
|
||||
}
|
||||
$.activityUrl = $.match(
|
||||
/(https?:\/\/[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|])/,
|
||||
$.activityUrl)
|
||||
$.domain = $.match(/https?:\/\/([^/]+)/, $.activityUrl)
|
||||
$.activityId = $.getQueryString($.activityUrl, 'activityId')
|
||||
let shopInfo = ''
|
||||
$.uid = ''//全都助力1号
|
||||
$.logic = async function () {
|
||||
if (!$.activityId || !$.activityUrl) {
|
||||
$.expire = true;
|
||||
$.putMsg(`activityId|activityUrl不存在`);
|
||||
return
|
||||
}
|
||||
$.log(`活动id: ${$.activityId}`, `活动url: ${$.activityUrl}`)
|
||||
$.UA = $.ua();
|
||||
let token = await $.isvObfuscator();
|
||||
if (token.code !== '0') {
|
||||
$.putMsg(`获取Token失败`);
|
||||
return
|
||||
}
|
||||
$.Token = token?.token
|
||||
|
||||
let actInfo = await $.api('customer/getSimpleActInfoVo',
|
||||
`activityId=${$.activityId}`);
|
||||
if (!actInfo.result || !actInfo.data) {
|
||||
$.log(`获取活动信息失败`);
|
||||
return
|
||||
}
|
||||
$.venderId = actInfo.data.venderId;
|
||||
$.shopId = actInfo.data.shopId;
|
||||
$.activityType = actInfo.data.activityType;
|
||||
|
||||
let myPing = await $.api('customer/getMyPing',
|
||||
`userId=${$.venderId}&token=${$.Token}&fromType=APP`)
|
||||
if (!myPing.result) {
|
||||
$.putMsg(`获取pin失败`);
|
||||
return
|
||||
}
|
||||
$.Pin = $.domain.includes('cjhy') ? encodeURIComponent(
|
||||
encodeURIComponent(myPing.data.secretPin)) : encodeURIComponent(
|
||||
myPing.data.secretPin);
|
||||
|
||||
await $.api(
|
||||
`common/${$.domain.includes('cjhy') ? 'accessLog' : 'accessLogWithAD'}`,
|
||||
`venderId=${$.venderId}&code=${$.activityType}&pin=${
|
||||
$.Pin}&activityId=${$.activityId}&pageUrl=${encodeURIComponent($.activityUrl)}&subType=app&adSource=`);
|
||||
|
||||
let userInfo = await $.api('wxActionCommon/getUserInfo',
|
||||
`pin=${$.Pin}`);
|
||||
if (!userInfo.result) {
|
||||
$.putMsg('获取用户信息,结束运行')
|
||||
return
|
||||
}
|
||||
$.nickname = userInfo.data.nickname;
|
||||
|
||||
//助力暂且不弄
|
||||
let activityContent = await $.api(
|
||||
'drawCenter/activityContent',
|
||||
`activityId=${$.activityId}&pin=${
|
||||
$.Pin}&nick=${$.nickname}&pinImg=${encodeURIComponent(
|
||||
'https://img10.360buyimg.com/imgzone/jfs/t1/21383/2/6633/3879/5c5138d8E0967ccf2/91da57c5e2166005.jpg')}&shareUuid=${$.uid}`,
|
||||
true);
|
||||
if (!activityContent.result || !activityContent.data) {
|
||||
$.putMsg(activityContent.errorMessage || '活动可能已结束')
|
||||
return
|
||||
}
|
||||
if (!$.uid) {
|
||||
$.uid = activityContent.data.uid//大概率助力码
|
||||
}
|
||||
let prizeList = await $.api('drawCenter/getPrizeList',
|
||||
`activityId=${$.activityId}&activityType=${$.activityType}&venderId=${$.venderId}`);
|
||||
if (prizeList.result) {
|
||||
$.content = prizeList.data;
|
||||
}
|
||||
let myInfo = await $.api('drawCenter/myInfo',
|
||||
`activityId=${$.activityId}&pin=${$.Pin}`);
|
||||
|
||||
if (!myInfo.result) {
|
||||
$.putMsg('获取任务列表失败')
|
||||
return
|
||||
}
|
||||
for (let ele of myInfo?.data?.taskList || []) {
|
||||
if (ele.curNum >= ele.maxNeed) {
|
||||
//完成了
|
||||
continue;
|
||||
}
|
||||
let count = ele.maxNeed - ele.curNum;
|
||||
if (ele.taskId === 'followsku') {
|
||||
$.log('followsku')
|
||||
let products = await $.api('drawCenter/getProduct',
|
||||
`activityId=${$.activityId}&pin=${
|
||||
$.Pin}&type=3`);
|
||||
for (let pd of products?.data.filter(o => !o.taskDone)) {
|
||||
if (count <= 0) {
|
||||
break;
|
||||
}
|
||||
await $.api('drawCenter/doTask',
|
||||
`activityId=${$.activityId}&pin=${
|
||||
$.Pin}&taskId=followsku¶m=${pd.skuId}`)
|
||||
await $.wait(200, 500)
|
||||
count--
|
||||
}
|
||||
}
|
||||
if (ele.taskId === 'add2cart') {
|
||||
$.log('add2cart')
|
||||
let products = await $.api('drawCenter/getProduct',
|
||||
`activityId=${$.activityId}&pin=${
|
||||
$.Pin}&type=1`);
|
||||
for (let pd of products?.data.filter(o => !o.taskDone)) {
|
||||
if (count <= 0) {
|
||||
break;
|
||||
}
|
||||
await $.api('drawCenter/doTask',
|
||||
`activityId=${$.activityId}&pin=${
|
||||
$.Pin}&taskId=add2cart¶m=${pd.skuId}`)
|
||||
await $.wait(200, 500)
|
||||
count--
|
||||
}
|
||||
}
|
||||
if (ele.taskId === 'scansku') {
|
||||
$.log('scansku')
|
||||
let products = await $.api('drawCenter/getProduct',
|
||||
`activityId=${$.activityId}&pin=${
|
||||
$.Pin}&type=2`);
|
||||
for (let pd of products?.data.filter(o => !o.taskDone)) {
|
||||
if (count <= 0) {
|
||||
break;
|
||||
}
|
||||
await $.api('drawCenter/doTask',
|
||||
`activityId=${$.activityId}&pin=${
|
||||
$.Pin}&taskId=scansku¶m=${pd.skuId}`)
|
||||
await $.wait(200, 500)
|
||||
count--
|
||||
}
|
||||
}
|
||||
if (ele.taskId === 'followshop') {
|
||||
$.log('followshop')
|
||||
await $.api('drawCenter/doTask',
|
||||
`activityId=${$.activityId}&pin=${
|
||||
$.Pin}&taskId=followshop¶m=`)
|
||||
}
|
||||
if (ele.taskId === 'joinvip') {
|
||||
$.log('joinvip')
|
||||
await $.api('drawCenter/doTask',
|
||||
`activityId=${$.activityId}&pin=${
|
||||
$.Pin}&taskId=joinvip¶m=`)
|
||||
}
|
||||
}
|
||||
activityContent = await $.api(
|
||||
'drawCenter/activityContent',
|
||||
`activityId=${$.activityId}&pin=${
|
||||
$.Pin}&nick=${$.nickname}&pinImg=${encodeURIComponent(
|
||||
'https://img10.360buyimg.com/imgzone/jfs/t1/21383/2/6633/3879/5c5138d8E0967ccf2/91da57c5e2166005.jpg')}&shareUuid=${$.uid}`,
|
||||
true);
|
||||
if (!activityContent.result) {
|
||||
$.putMsg('获取不到活动信息,结束运行')
|
||||
return
|
||||
}
|
||||
$.canDrawTimes = activityContent.data.chance || 0
|
||||
if ($.canDrawTimes === 0) {
|
||||
$.putMsg(`抽奖次数 ${$.canDrawTimes}`)
|
||||
return
|
||||
}
|
||||
for (let i = 0; i < $.canDrawTimes; i++) {
|
||||
let prize = await $.api('/drawCenter/draw/luckyDraw',
|
||||
`activityId=${$.activityId}&pin=${$.Pin}`);
|
||||
if (prize.result) {
|
||||
let msg = prize.data.drawOk ? prize.data.name
|
||||
: prize.data.errorMessage || '空气';
|
||||
$.putMsg(msg)
|
||||
} else {
|
||||
if (prize.errorMessage) {
|
||||
await $.wxStop(prize.errorMessage) ? $.expire = true : ''
|
||||
$.putMsg(`${prize.errorMessage}`);
|
||||
|
||||
}
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
$.after = async function () {
|
||||
if ($.msg.length > 0) {
|
||||
let message = `\n${(await $.getShopInfo()).shopName || ''}\n`;
|
||||
for (let ele of $.content || []) {
|
||||
if (ele.name.includes('谢谢') || ele.name.includes('再来')) {
|
||||
continue;
|
||||
}
|
||||
message += ` ${ele.name}${ele?.type === 8 ? '专享价' : ''}\n`
|
||||
}
|
||||
$.msg.push(message)
|
||||
$.msg.push($.activityUrl);
|
||||
}
|
||||
}
|
||||
$.run({whitelist: ['1-5'], wait: [1000, 3000]}).catch(reason => $.log(reason));
|
File diff suppressed because one or more lines are too long
81
magic.json
81
magic.json
@ -1,15 +1,74 @@
|
||||
{
|
||||
"user_id": 9513068,
|
||||
"bot_token": "1657567:AAGO7sxIVvhdSHSJt_k_0u_C1w7U",
|
||||
"api_id": "37419",
|
||||
"api_hash": "f81a30b54255566c15b3d578",
|
||||
"//proxy 需要代理 true 不需要道理 false": 1,
|
||||
"api_id": 3741859,
|
||||
"api_hash": "f81a30b542215b3d578",
|
||||
"bot_id": 1657544667,
|
||||
"bot_token": "1657544667:AAGO7sit_k_0u_C1w7U",
|
||||
"user_id": 951306588,
|
||||
"proxy": true,
|
||||
"proxy_add": "127.0.0.1",
|
||||
"proxy_type": "socks5",
|
||||
"proxy_addr": "127.0.0.1",
|
||||
"proxy_port": 7890,
|
||||
"proxy_username": "",
|
||||
"proxy_password": "",
|
||||
"//base_path 填脚本所在目录": 1,
|
||||
"base_path": "填脚本所在目录",
|
||||
"car_group_id": -1001533334185
|
||||
"command": "task",
|
||||
"log_path": "/jd/log",
|
||||
"log_send": true,
|
||||
"monitor_cache_size": 30,
|
||||
"monitor_cars": [
|
||||
-1001718319262,
|
||||
-1001533334185,
|
||||
1657544667
|
||||
],
|
||||
"monitor_auto_stops": [
|
||||
"jd_AutoOpenCard"
|
||||
],
|
||||
"monitor_scripts_path": "/jd/scripts",
|
||||
"monitor_scripts": {
|
||||
"M_WX_ADD_CART_URL": {
|
||||
"name": "M加购有礼",
|
||||
"file": "m_jd_wx_addCart.js",
|
||||
"wait": 0,
|
||||
"queue": false,
|
||||
"queue_name": "M_WX_ADD_CART_URL",
|
||||
"enable": true
|
||||
},
|
||||
"M_WX_LUCK_DRAW_URL": {
|
||||
"name": "M幸运抽奖",
|
||||
"file": "m_jd_wx_luckDraw.js",
|
||||
"wait": 5,
|
||||
"queue": true,
|
||||
"queue_name": "M_WX_LUCK_DRAW_URL",
|
||||
"enable": true
|
||||
},
|
||||
"M_WX_CENTER_DRAW_URL": {
|
||||
"name": "M老虎机抽奖",
|
||||
"file": "m_jd_wx_centerDraw.js",
|
||||
"wait": 0,
|
||||
"queue": false,
|
||||
"queue_name": "M_WX_CENTER_DRAW_URL",
|
||||
"enable": true
|
||||
},
|
||||
"M_FAV_SHOP_ARGV": {
|
||||
"name": "M收藏有礼",
|
||||
"file": "m_jd_fav_shop_gift.js",
|
||||
"wait": 0,
|
||||
"queue": false,
|
||||
"queue_name": "M_FAV_SHOP_ARGV",
|
||||
"enable": true
|
||||
},
|
||||
"M_FOLLOW_SHOP_ARGV": {
|
||||
"name": "M关注有礼",
|
||||
"file": "m_jd_follow_shop.js",
|
||||
"wait": 0,
|
||||
"queue": false,
|
||||
"queue_name": "M_FOLLOW_SHOP_ARGV",
|
||||
"enable": true
|
||||
},
|
||||
"M_FANS_RED_PACKET_URL": {
|
||||
"name": "M粉丝红包",
|
||||
"file": "m_jd_fans_redPackt.js",
|
||||
"wait": 0,
|
||||
"queue": false,
|
||||
"queue_name": "M_FANS_RED_PACKET_URL",
|
||||
"enable": true
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user