66cron: 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
2323const $ = new Env ( "康师傅" ) ;
24- let ckName = `wxkangshifuwxid ` ;
24+ let ckName = `wxid_ksf ` ;
2525const strSplitor = "#" ;
2626const envSplitor = [ "&" , "\n" ] ;
2727const notify = $ . isNode ( ) ? require ( "../sendNotify" ) : "" ;
2828const axios = require ( "axios" ) ;
2929const 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 || ""
3231let appid = 'wx54f3e6a00f7973a7'
3332class 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