mirror of
https://github.com/ctrlcvs/xiaoyao-cvs-plugin.git
synced 2024-12-22 19:10:53 +08:00
修正一个ck多个账号无法签到多个账号问题
This commit is contained in:
parent
394345de13
commit
1a4fdf0d8a
@ -97,7 +97,7 @@ export async function sign(e) {
|
||||
});
|
||||
}, RETRY_OPTIONS);
|
||||
Bot.logger.info(`${forum.name} 签到结果: [${resObj.message}]`);
|
||||
resultMessage += `签到: [${resObj.message}]\n`;
|
||||
resultMessage += `签到: \n${resObj.message}\n`;
|
||||
} catch (e) {
|
||||
Bot.logger.error(`${forum.name} 签到失败 [${e.message}]`);
|
||||
resultMessage += `签到失败: [${e.message}]\n`;
|
||||
|
@ -110,14 +110,18 @@ export default class MihoYoApi {
|
||||
try {
|
||||
// 获取账号信息
|
||||
const objData = await this.getUserInfo(kkbody)
|
||||
if (objData.retcode != 200) {
|
||||
return objData
|
||||
}
|
||||
if (!objData.nickname) {
|
||||
let data=objData.data
|
||||
if(data?.list?.length==0){
|
||||
return {
|
||||
message: `未绑定${name}信息`
|
||||
}
|
||||
}
|
||||
let message=`\n${name}共计${data.list.length}个账号\n`;
|
||||
for(let item of data.list){
|
||||
let objshuj=(await this.postSign(kkbody, item.game_uid, item.region))
|
||||
message+=`游戏id:${item.game_uid}:${objshuj.message}\n`
|
||||
await utils.randomSleepAsync();
|
||||
}
|
||||
// 获取签到信息和奖励信息 、、后续重新梳理补充
|
||||
// const {
|
||||
// name,
|
||||
@ -129,7 +133,7 @@ export default class MihoYoApi {
|
||||
// }
|
||||
// }
|
||||
// 签到操作
|
||||
return await this.postSign(kkbody, objData.game_uid, objData.region)
|
||||
return {message}
|
||||
} catch (error) {
|
||||
Bot.logger.mark(`error.message`, error.message)
|
||||
}
|
||||
@ -401,18 +405,14 @@ export default class MihoYoApi {
|
||||
.getpubHeaders(board)).timeout(10000);
|
||||
let resObj = JSON.parse(res.text);
|
||||
let data = resObj.data
|
||||
// console.log(resObj)
|
||||
if (resObj.retcode != 0) {
|
||||
return resObj
|
||||
}
|
||||
const game_uid = data?.list?. [0]?.game_uid
|
||||
const region = data?.list?. [0]?.region
|
||||
const nickname = data?.list?. [0]?.nickname
|
||||
return {
|
||||
game_uid,
|
||||
region,
|
||||
nickname,
|
||||
retcode: 200
|
||||
}
|
||||
// const game_uid = data?.list?. [0]?.game_uid
|
||||
// const region = data?.list?. [0]?.region
|
||||
// const nickname = data?.list?. [0]?.nickname
|
||||
return resObj
|
||||
}
|
||||
// 游戏签到操作
|
||||
async postSign(board, game_uid, region) {
|
||||
|
Loading…
Reference in New Issue
Block a user