This commit is contained in:
smallfawn
2023-06-30 13:56:03 +08:00
parent 2a01603920
commit 48d3ad9346

50
jlzx.js
View File

@@ -26,8 +26,8 @@ async function main(userInfo) {
await userInfo.sign() await userInfo.sign()
await userInfo.grxx() await userInfo.grxx()
// await userInfo.Sendtg_bot() // await userInfo.Sendtg_bot()
@@ -42,10 +42,10 @@ class UserInfo {
if (tgLogFlag) { if (tgLogFlag) {
try { try {
this.mopenid = str.split("##")[0] this.mopenid = str.split("##")[0]
this.chatId = str.split("##")[1] this.chatId = str.split("##")[1]
this.ck = str this.ck = str
//this.ts = ts13() //this.ts = ts13()
} catch (error) { } catch (error) {
console.log(error) console.log(error)
@@ -56,50 +56,50 @@ class UserInfo {
} }
async sign() { async sign() {
let name = "签到"; let name = "签到";
let options = { let options = {
method: "post", method: "post",
url: `https://superapp.jmc.com.cn/jmc-zx-app-owner/v1/signIn/add`, url: `https://superapp.jmc.com.cn/jmc-zx-app-owner/v1/signIn/add`,
headers: { headers: {
"Host": "superapp.jmc.com.cn", "Host": "superapp.jmc.com.cn",
"Content-Length": "33", "Content-Length": "33",
"Access-Token": `${this.ck}`, "Access-Token": `${this.ck}`,
"Content-Type": "application/json" "Content-Type": "application/json"
}, },
body: `{"activityCode":"HD202302090003"}` body: `{"activityCode":"HD202302090003"}`
}; };
// console.log(options); // console.log(options);
let res = await httpRequest(options); let res = await httpRequest(options);
//console.log(res); //console.log(res);
if (res.resultCode == 0) { if (res.resultCode == 0) {
this.token = res.token this.token = res.token
this.cusLog(`账号 ${this.index} ${name}: 签到成功 ${res.resultMsg} `) this.cusLog(`账号 ${this.index} ${name}: 签到成功 ${res.resultMsg} `)
} else if (res.resultCode == 100000) { } else if (res.resultCode == 100000) {
this.cusLog(`账号 ${this.index} ${name}: ${res.resultMsg}`) this.cusLog(`账号 ${this.index} ${name}: ${res.resultMsg}`)
} else this.cusLog(`账号[${this.index}] ${name} 失败 ❌ 了呢`), console.log(res); } else this.cusLog(`账号[${this.index}] ${name} 失败 ❌ 了呢`), console.log(res);
} }
async grxx() { async grxx() {
let name = "个人信息"; let name = "个人信息";
let options = { let options = {
method: "get", method: "get",
url: `https://superapp.jmc.com.cn/jmc-zx-app-owner/v1/member/getMemberInfo`, url: `https://superapp.jmc.com.cn/jmc-zx-app-owner/v1/member/getMemberInfo`,
headers: { headers: {
"Host": "superapp.jmc.com.cn", "Host": "superapp.jmc.com.cn",
"Content-Length": "33", "Content-Length": "33",
"Access-Token": `${this.ck}`, "Access-Token": `${this.ck}`,
"Content-Type": "application/json" "Content-Type": "application/json"
} }
}; };
// console.log(options); // console.log(options);
let res = await httpRequest(options); let res = await httpRequest(options);
//console.log(res); //console.log(res);
if (res.resultCode == 0) { if (res.resultCode == 0) {
this.token = res.token this.token = res.token
this.cusLog(`账号 ${this.index} ${name}: 总积分 ${res.data.integralQuantity} `) this.cusLog(`账号 ${this.index} ${name}: 总积分 ${res.data.integralQuantity} `)
} else if (res.resultCode == 100000) { } else if (res.resultCode == 100000) {
this.cusLog(`账号 ${this.index} ${name}: ${res.resultMsg}`) this.cusLog(`账号 ${this.index} ${name}: ${res.resultMsg}`)
} else this.cusLog(`账号[${this.index}] ${name} 失败 ❌ 了呢`), console.log(res); } else this.cusLog(`账号[${this.index}] ${name} 失败 ❌ 了呢`), console.log(res);