mirror of
https://github.com/zjk2017/ArcadiaScriptPublic.git
synced 2025-12-18 07:54:35 +08:00
Update qtx.js
This commit is contained in:
40
qtx.js
40
qtx.js
@@ -1,8 +1,10 @@
|
|||||||
/**
|
/**
|
||||||
* 青碳行
|
* 青碳行
|
||||||
* cron: 9 5 * * *
|
* cron: 9 5 * * *
|
||||||
* fix 20240623 原作者smallfawn 增加分享功能 实物可以搞
|
* fix 20240623 原作者smallfawn 增加分享功能
|
||||||
* ========= 青龙--配置文件 ===========
|
*20241226 修复bug
|
||||||
|
可以换实物可以做地铁有优惠
|
||||||
|
========= 青龙--配置文件 ===========
|
||||||
* # 项目名称
|
* # 项目名称
|
||||||
* export qtxtk='token&deviceCoding'
|
* export qtxtk='token&deviceCoding'
|
||||||
*
|
*
|
||||||
@@ -25,6 +27,9 @@ let userCookie = ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || '';
|
|||||||
let userList = [];
|
let userList = [];
|
||||||
let userIdx = 0;
|
let userIdx = 0;
|
||||||
let userCount = 0;
|
let userCount = 0;
|
||||||
|
|
||||||
|
//let date = new Date();
|
||||||
|
|
||||||
//---------------------- 自定义变量区域 -----------------------------------
|
//---------------------- 自定义变量区域 -----------------------------------
|
||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
|
|
||||||
@@ -97,7 +102,17 @@ class UserInfo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
this.headersv2 = {
|
||||||
|
'Content-Type': 'application/json; charset=utf-8',
|
||||||
|
'Host': 'carbon.lcago.cn',
|
||||||
|
'channel': 'qtx',
|
||||||
|
'Connection': 'Keep-Alive',
|
||||||
|
'token':this.ck,
|
||||||
|
|
||||||
|
|
||||||
|
//'Accept-Encoding': 'gzip',
|
||||||
|
'User-Agent': 'okhttp/3.12.'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getRandomTime() {
|
getRandomTime() {
|
||||||
@@ -158,13 +173,22 @@ async walk() {
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
async task_signIn() {//userinfo
|
getFormattedDate() {
|
||||||
try {
|
const sillyDatetime = require('silly-datetime');
|
||||||
let options = {
|
const date = sillyDatetime.format(new Date(), 'YYYY-MM-DD');
|
||||||
url: `https://carbon.lcago.cn/signIn/sign`,
|
return date;
|
||||||
headers: this.headers,
|
}
|
||||||
body: `{"token":"${this.ck}","platform":"android","model":"MI8","appChannel":"qtx","version":"1.3.3_VersionCode_111","deviceCoding":"${this.deviceCoding}","language":"ZH","systemversion":"10"}`
|
|
||||||
|
|
||||||
|
// 调用函数获取日期并输出
|
||||||
|
|
||||||
|
//#console.log(today);
|
||||||
|
async task_signIn() {
|
||||||
|
try {
|
||||||
|
const today = this.getFormattedDate();
|
||||||
|
let options = {
|
||||||
|
url: `https://carbon.lcago.cn/signIn/v2/sign`,
|
||||||
|
headers: this.headersv2,
|
||||||
|
body: `{"signType":0,"signDate":"${today}"}`
|
||||||
}
|
}
|
||||||
//console.log(options);
|
//console.log(options);
|
||||||
let result = await httpRequest(options);
|
let result = await httpRequest(options);
|
||||||
|
|||||||
Reference in New Issue
Block a user