Skip to content

Commit f0e9412

Browse files
committed
Update kangshifu.js
1 parent f029ec8 commit f0e9412

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

wxapp/kangshifu.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
cron: 12 12 * * *
77
------------------------------------------
88
#Notice: 只适用于购买了luflytoken的 购买联系QQ860562056
9-
变量luflytoken 填写luflytoken
10-
变量wxkangshifuwxid 填写wxkangshifuwxid 多账号&分割或者换行
9+
变量wxcenter 填写自己部署的wxxcenter的域名,
10+
变量wxid_ksf 在程序内登录的wxid 多账号&分割或者换行
1111
1212
⚠️【免责声明】
1313
------------------------------------------
@@ -21,14 +21,13 @@ cron: 12 12 * * *
2121
*/
2222

2323
const $ = new Env("康师傅");
24-
let ckName = `wxkangshifuwxid`;
24+
let ckName = `wxid_ksf`;
2525
const strSplitor = "#";
2626
const envSplitor = ["&", "\n"];
2727
const notify = $.isNode() ? require("../sendNotify") : "";
2828
const axios = require("axios");
2929
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"
30-
let luflytoken = process.env.luflytoken || ""
31-
let wxcenter = 'http://w.smallfawn.top:5789'
30+
let wxcenter = process.env.wxcenter || ""
3231
let appid = 'wx54f3e6a00f7973a7'
3332
class Public {
3433
async request(options) {
@@ -47,16 +46,16 @@ class Task extends Public {
4746

4847
async getcode() {
4948
let options = {
50-
url: `${wxcenter}/api/getcode`,
49+
url: `${wxcenter}/api/Wxapp/JSLogin`,
5150
headers: {
5251
'Content-Type': 'application/json'
5352
},
5453
method: 'POST',
55-
data: { "luflyKey": "" + luflytoken, "wxid": "" + this.wxid, "appid": "" + appid }
54+
data: { "Wxid": "" + this.wxid, "Appid": "" + appid }
5655
}
5756
let { data: result } = await this.request(options);
58-
if (result.status) {
59-
let code = result.data
57+
if (result.Success) {
58+
let code = result.Data.code
6059
$.log(`账号[${this.index}]【${this.name}】 获取code成功[${code}]`);
6160
await this.login(code)
6261
} else {
@@ -108,6 +107,7 @@ class Task extends Public {
108107

109108
}
110109
async run() {
110+
if (!wxcenter) $.log(`请填写wxcenter`)
111111
await this.getcode()
112112
}
113113
}

0 commit comments

Comments
 (0)