|
@ -1,11 +1,11 @@ |
|
|
/* |
|
|
/* |
|
|
#528-签到 |
|
|
#统一签到 |
|
|
cron: 34 9,21 * * * |
|
|
cron: 34 9,21 * * * |
|
|
|
|
|
|
|
|
export q528Cookie='token1#token2' |
|
|
export q528Cookie='token1#token2' |
|
|
*/ |
|
|
*/ |
|
|
const $ = new Env('528签到'); |
|
|
const $ = new Env('统一签到'); |
|
|
const jsname = '528签到' |
|
|
const jsname = '统一签到' |
|
|
const logDebug = 0 |
|
|
const logDebug = 0 |
|
|
|
|
|
|
|
|
const notifyFlag = 1; //0为关闭通知,1为打开通知,默认为1
|
|
|
const notifyFlag = 1; //0为关闭通知,1为打开通知,默认为1
|
|
@ -14,7 +14,7 @@ let notifyStr = '' |
|
|
let envSplitor = ['\n', '#'] |
|
|
let envSplitor = ['\n', '#'] |
|
|
let httpResult //global buffer
|
|
|
let httpResult //global buffer
|
|
|
|
|
|
|
|
|
let userCookie = ($.isNode() ? process.env.q528Cookie : $.getdata('q528Cookie')) || ''; |
|
|
let userCookie ='token1#token2';// ($.isNode() ? process.env.q528Cookie : $.getdata('q528Cookie')) || '';
|
|
|
let userList = [] |
|
|
let userList = [] |
|
|
|
|
|
|
|
|
let userIdx = 0 |
|
|
let userIdx = 0 |
|
@ -41,6 +41,72 @@ class UserInfo { |
|
|
console.log(`签到成功,连续签到${result.data.keepDay}天`) |
|
|
console.log(`签到成功,连续签到${result.data.keepDay}天`) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//世贸广场签到
|
|
|
|
|
|
async doSMGCSign () { |
|
|
|
|
|
let url = `https://m.mallcoo.cn/api/user/User/CheckinV2` |
|
|
|
|
|
let urlObject = { |
|
|
|
|
|
url: url, |
|
|
|
|
|
headers: { |
|
|
|
|
|
"Host": "m.mallcoo.cn", |
|
|
|
|
|
"Connection": "keep-alive", |
|
|
|
|
|
"Content-Length": "0", |
|
|
|
|
|
"User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36 MicroMessenger/7.0.9.501 NetType/WIFI MiniProgramEnv/Windows WindowsWechat", |
|
|
|
|
|
"content-type": "application/json", |
|
|
|
|
|
"Referer": "https://servicewechat.com/wx9c647c3b2c553176/6/page-frame.html", |
|
|
|
|
|
"Accept-Encoding": "gzip, deflate, br" |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
let body = `{"MallID":11672,"Header":{"Token":"TY8H3zv8a0OYa0F02omuTgLcEU8ysRlE,16495","systemInfo":{"model":"microsoft","SDKVersion":"2.19.2","system":"Windows 10 x64","version":"3.5.0","miniVersion":"DZ.2.5.55.3SMGC.11AR"}}}` |
|
|
|
|
|
if(body) { |
|
|
|
|
|
urlObject.body = body |
|
|
|
|
|
urlObject.headers['Content-Type'] = 'application/json; charset=UTF-8' |
|
|
|
|
|
urlObject.headers['Content-Length'] = urlObject.body ? urlObject.body.length : 0 |
|
|
|
|
|
} |
|
|
|
|
|
await httpRequest('post', urlObject) |
|
|
|
|
|
let result = httpResult; |
|
|
|
|
|
if (!result) return |
|
|
|
|
|
//console.log(result)
|
|
|
|
|
|
if (result.m!=1) { |
|
|
|
|
|
console.log(`签到失败:${result.e }`) |
|
|
|
|
|
} else { |
|
|
|
|
|
console.log(`签到成功,${result.d.Msg}`) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//壳牌签到
|
|
|
|
|
|
async doQPSign () { |
|
|
|
|
|
let url = `https://xcx.cdshell.com/base/coupon/addUserRecord` |
|
|
|
|
|
let urlObject = { |
|
|
|
|
|
url: url, |
|
|
|
|
|
headers: { |
|
|
|
|
|
"Host": "xcx.cdshell.com", |
|
|
|
|
|
"Connection": "keep-alive", |
|
|
|
|
|
"Content-Length": "0", |
|
|
|
|
|
"Authorization": "Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiI1NzY0NTY0IiwiZXhwIjoxNjc2MzQ0MDU0LCJpYXQiOjE2NzU3MzkyNTR9.S-gJPLhOmXzSEpHy1Y2fCSO2P1G8m8KmJJ78EKiXPh1XfymowliSjLPiGpZ9Ykie4_3CPCO-wCNdmHTfwMAqpA", |
|
|
|
|
|
"User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36 MicroMessenger/7.0.9.501 NetType/WIFI MiniProgramEnv/Windows WindowsWechat", |
|
|
|
|
|
"content-type": "application/x-www-form-urlencoded", |
|
|
|
|
|
"Referer": "https://servicewechat.com/wx9c647c3b2c553176/6/page-frame.html", |
|
|
|
|
|
"Accept-Encoding": "gzip, deflate, br" |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
let body = `operateType=4&type=3&appid=9965481e994f42ed&sign=WJOG%2FDrUD7r6JSqTHuTO%2BYLxRns%3D` |
|
|
|
|
|
if(body) { |
|
|
|
|
|
urlObject.body = body |
|
|
|
|
|
urlObject.headers['Content-Length'] = urlObject.body ? urlObject.body.length : 0 |
|
|
|
|
|
} |
|
|
|
|
|
await httpRequest('post', urlObject) |
|
|
|
|
|
let result = httpResult; |
|
|
|
|
|
if (!result) return |
|
|
|
|
|
//console.log(result)
|
|
|
|
|
|
if (result.code!=200) { |
|
|
|
|
|
console.log(`签到失败:${result.Msg}`) |
|
|
|
|
|
} else { |
|
|
|
|
|
console.log(`签到成功,${result.Msg}`) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
!(async () => { |
|
|
!(async () => { |
|
@ -50,7 +116,8 @@ class UserInfo { |
|
|
if (!(await checkEnv())) return; |
|
|
if (!(await checkEnv())) return; |
|
|
|
|
|
|
|
|
for (let user of userList) { |
|
|
for (let user of userList) { |
|
|
await user.doSign(); |
|
|
await user.doSMGCSign(); |
|
|
|
|
|
await user.doQPSign(); |
|
|
await $.wait(200); |
|
|
await $.wait(200); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |