mirror of
https://github.com/ctrlcvs/xiaoyao-cvs-plugin.git
synced 2024-12-22 19:10:53 +08:00
由于目前方案无法过验证码签到 已移除
This commit is contained in:
parent
4e4af821a4
commit
b1708eb522
18
apps/user.js
18
apps/user.js
@ -164,12 +164,25 @@ export async function mytoken(e) {
|
||||
export async function bindLogin_ticket(e){
|
||||
let user = new User(e);
|
||||
let ckMap=await utils.getCookieMap(e.original_msg.replace(/'|"/g,""))
|
||||
let stuid=ckMap?.get("login_uid") ? ckMap?.get("login_uid") : ckMap?.get("ltuid")
|
||||
if(!stuid) stuid= ckMap?.get("account_id");
|
||||
if(ckMap&&Cfg.get("ck.sk")){
|
||||
let res= await user.getData("bbsStoken", {
|
||||
loginUid:ckMap?.get("login_uid") ? ckMap?.get("login_uid") : ckMap?.get("ltuid"),
|
||||
loginUid:stuid,
|
||||
loginTicket:ckMap.get("login_ticket"),
|
||||
},false)
|
||||
})
|
||||
if(res?.retcode===0){
|
||||
if (res?.data) {
|
||||
let datalist={}
|
||||
datalist[e.uid] = {
|
||||
stuid:stuid,
|
||||
stoken: res.data.list[0].token,
|
||||
ltoken: res.data.list[1].token,
|
||||
uid: e.uid,
|
||||
userId: e.user_id,
|
||||
is_sign: true
|
||||
}
|
||||
gsCfg.saveBingStoken(e.user_id, datalist)
|
||||
let msg = 'stoken绑定成功您可通过下列指令进行操作:';
|
||||
msg += '\n【#米币查询】查询米游币余额'
|
||||
msg += '\n【#mys原神签到】获取米游币'
|
||||
@ -180,6 +193,7 @@ export async function bindLogin_ticket(e){
|
||||
e.reply(msg)
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -120,21 +120,21 @@ export default class user {
|
||||
}
|
||||
message += `${item.nickname}-${item.game_uid}:今日已签到~\n`;
|
||||
} else {
|
||||
for (let i = 0; i < 2; i++) { //循环请求
|
||||
let signTime = await redis.get(`xiaoyao:sign`)
|
||||
if (signTime) {
|
||||
//有数据的时候不得行必须出去
|
||||
if (!mysTask) {
|
||||
message += `${item.nickname}-${item.game_uid}:验证码失败请等待6分钟后重试或者手动上米游社签到~`;
|
||||
break;
|
||||
} else {
|
||||
await utils.sleepAsync(60000 * 6) //等6分钟再说
|
||||
//ps:你要是觉得改有加高过的概率就改吧,随便你反正到时候黑IP的不是我
|
||||
}
|
||||
}
|
||||
// for (let i = 0; i < 2; i++) { //循环请求
|
||||
// let signTime = await redis.get(`xiaoyao:sign`)
|
||||
// if (signTime) {
|
||||
// //有数据的时候不得行必须出去
|
||||
// if (!mysTask) {
|
||||
// message += `${item.nickname}-${item.game_uid}:验证码失败请等待6分钟后重试或者手动上米游社签到~`;
|
||||
// break;
|
||||
// } else {
|
||||
// // await utils.sleepAsync(60000 * 6) // 由于这个方法已经无法过验证码了所以不在处理
|
||||
// //ps:你要是觉得改有加高过的概率就改吧,随便你反正到时候黑IP的不是我
|
||||
// }
|
||||
// }
|
||||
await utils.sleepAsync(2000)
|
||||
res = await this.getData("sign", data, false)
|
||||
if (res?.data?.gt) { //进行3次验证码访问签到加高通过概率
|
||||
if (res?.data?.gt) {
|
||||
let validate = await this.geetest(res.data)
|
||||
if (validate) {
|
||||
let header = {}
|
||||
@ -157,6 +157,10 @@ export default class user {
|
||||
message +=
|
||||
`${item.nickname}-${item.game_uid}:签到出现验证码~\n请晚点后重试,或者手动上米游社签到\n`;
|
||||
}
|
||||
} else {
|
||||
if (this.allSign) {
|
||||
this.allSign[forum.name].error++;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (this.allSign) {
|
||||
@ -168,7 +172,7 @@ export default class user {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
// }
|
||||
//获取签到信息和奖励信息
|
||||
const SignInfo = await this.getData("home", data, false)
|
||||
if (SignInfo) {
|
||||
@ -405,7 +409,8 @@ export default class user {
|
||||
sendReply() {
|
||||
let msg = ""
|
||||
for (let item of this.findModel) {
|
||||
msg+=`**${item}**\n已签:${this[item].isSign}\n签到成功:${this[item].sign}\n未绑定信息:${this[item].bindGame}\n签到失败异常:${this[item].error}\n`
|
||||
msg +=
|
||||
`**${item}**\n已签:${this[item].isSign}\n签到成功:${this[item].sign}\n未绑定信息:${this[item].bindGame}\n签到失败异常:${this[item].error}\n`
|
||||
}
|
||||
return msg
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user