mirror of
https://github.com/smallfawn/QLScriptPublic.git
synced 2025-12-17 15:25:10 +08:00
Update bnmdhg_wx.js
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
@Description: 测试
|
||||
------------------------------------------
|
||||
#Notice: 只适用于购买了luflytoken的 购买联系QQ860562056
|
||||
变量luflytoken 填写luflytoken
|
||||
变量wxbnmdwxid 填写wxbnmdwxid 多账号&分割或者换行
|
||||
变量wxid_bnmd 填写wxid_bnmd 多账号&分割或者换行
|
||||
wxcenter 填写wxcenter
|
||||
⚠️【免责声明】
|
||||
------------------------------------------
|
||||
1、此脚本仅用于学习研究,不保证其合法性、准确性、有效性,请根据情况自行判断,本人对此不承担任何保证责任。
|
||||
@@ -19,7 +19,7 @@
|
||||
*/
|
||||
|
||||
const $ = new Env("巴奴毛肚小程序");
|
||||
let ckName = `wxbnmdwxid`;
|
||||
let ckName = `wxid_bnmd`;
|
||||
const strSplitor = "#";
|
||||
const envSplitor = ["&", "\n"];
|
||||
const crypto = require("crypto-js");
|
||||
@@ -27,8 +27,7 @@ const notify = $.isNode() ? require("../sendNotify") : "";
|
||||
const axios = require("axios");
|
||||
const defaultUserAgent = "Mozilla/5.0 (iPhone; CPU iPhone OS 16_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.31(0x18001e31) NetType/WIFI Language/zh_CN miniProgram"
|
||||
const key = "bfc5e947cd84c7ced1ee48d28fb3e90f";
|
||||
let luflytoken = process.env.luflytoken || ""
|
||||
let wxcenter = 'http://w.smallfawn.top:5789'
|
||||
let wxcenter = process.env.wxcenter || ""
|
||||
let appid = 'wx71373698c47f9a9f'
|
||||
class Public {
|
||||
async request(options) {
|
||||
@@ -120,17 +119,23 @@ class Task extends Public {
|
||||
})));
|
||||
}
|
||||
async getcode() {
|
||||
|
||||
let options = {
|
||||
url: `${wxcenter}/api/getcode`,
|
||||
url: `${wxcenter}/api/Wxapp/JSLogin`,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
method: 'POST',
|
||||
data: { "luflyKey": "" + luflytoken, "wxid": "" + this.wxid, "appid": "" + appid }
|
||||
data: { "Wxid": "" + this.wxid, "Appid": "" + appid }
|
||||
}
|
||||
let { data: result } = await this.request(options);
|
||||
if (result.status) {
|
||||
let code = result.data
|
||||
|
||||
|
||||
|
||||
|
||||
if (result.Success) {
|
||||
let code = result.Data.code
|
||||
$.log(`账号[${this.index}]【${this.name}】 获取code成功[${code}]`);
|
||||
$.log(`账号[${this.wxid}] 获取code成功[${code}]`);
|
||||
let { member_id: memberId, openid: authorization } = await this.login(code)
|
||||
const headerObj = {};
|
||||
@@ -159,15 +164,19 @@ class Task extends Public {
|
||||
headers: this.getHeaders(headerObj, false, authorization)
|
||||
});
|
||||
const result = "\nMember_id:" + memberId + "\n用户名:" + info.data.data.name + "\n总积分:" + info.data.data.points;
|
||||
$.log(result);
|
||||
|
||||
} catch (err) {
|
||||
|
||||
console.log("签到失败:" + err + " | 签到时间:" + Date.now());
|
||||
$.log("签到失败:" + err + " | 签到时间:" + Date.now());
|
||||
}
|
||||
} else {
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
async login(code) {
|
||||
let url = 'https://cloud.banu.cn/api/wx/weapp/auth';
|
||||
@@ -188,6 +197,7 @@ class Task extends Public {
|
||||
return res.data;
|
||||
}
|
||||
async run() {
|
||||
if (!wxcenter) return $.log(`请填写wxcenter`)
|
||||
|
||||
await this.getcode()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user