2
0
mirror of https://github.com/ctrlcvs/xiaoyao-cvs-plugin.git synced 2024-12-23 11:40:51 +08:00

修正V3拦截ck问题

This commit is contained in:
Ctrlcvs 2022-08-05 10:29:50 +08:00 committed by leiyilu
parent 700f017b44
commit f3a10a3122

View File

@ -150,7 +150,7 @@ export async function mysSign(e) {
post = post.post; post = post.post;
// 2.1 BBS read post // 2.1 BBS read post
let resObj = await promiseRetry((retry, number) => { let resObj = await promiseRetry((retry, number) => {
Bot.logger.mark(`读取帖子: [${post.subject}] 尝试次数: ${number}`); // Bot.logger.mark(`读取帖子: [${post.subject}] 尝试次数: ${number}`);
return miHoYoApi.forumPostDetail(post['post_id']).catch((e) => { return miHoYoApi.forumPostDetail(post['post_id']).catch((e) => {
Bot.logger.error(`${forum.name} 读取帖子失败: [${e.message}] 尝试次数: ${number}`); Bot.logger.error(`${forum.name} 读取帖子失败: [${e.message}] 尝试次数: ${number}`);
return retry(e); return retry(e);
@ -160,7 +160,7 @@ export async function mysSign(e) {
await utils.randomSleepAsync(); await utils.randomSleepAsync();
// 2.2 BBS vote post // 2.2 BBS vote post
resObj = await promiseRetry((retry, number) => { resObj = await promiseRetry((retry, number) => {
Bot.logger.mark(`点赞帖子: [${post.subject}] 尝试次数: ${number}`); // Bot.logger.mark(`点赞帖子: [${post.subject}] 尝试次数: ${number}`);
return miHoYoApi.forumPostVote(post['post_id']).catch((e) => { return miHoYoApi.forumPostVote(post['post_id']).catch((e) => {
Bot.logger.error(`${forum.name} 点赞帖子失败: [${e.message}] 尝试次数: ${number}`); Bot.logger.error(`${forum.name} 点赞帖子失败: [${e.message}] 尝试次数: ${number}`);
return retry(e); return retry(e);
@ -173,7 +173,7 @@ export async function mysSign(e) {
// 2.3 BBS share post // 2.3 BBS share post
let sharePost = postList[0].post; let sharePost = postList[0].post;
resObj = await promiseRetry((retry, number) => { resObj = await promiseRetry((retry, number) => {
Bot.logger.mark(`分享帖子: [${sharePost.subject}] 尝试次数: ${number}`); // Bot.logger.mark(`分享帖子: [${sharePost.subject}] 尝试次数: ${number}`);
return miHoYoApi.forumPostShare(sharePost['post_id']).catch((e) => { return miHoYoApi.forumPostShare(sharePost['post_id']).catch((e) => {
Bot.logger.error(`${forum.name} 分享帖子失败: [${e.message}] 尝试次数: ${number}`); Bot.logger.error(`${forum.name} 分享帖子失败: [${e.message}] 尝试次数: ${number}`);
return retry(e); return retry(e);
@ -429,6 +429,10 @@ export async function yuntoken(e){
return false; return false;
} }
let msg=e.msg.split("devId") let msg=e.msg.split("devId")
if(msg.length<2){
return false;
}
let devId=msg[1].replace(/=/,"") let devId=msg[1].replace(/=/,"")
let yuntoken=msg[0]; let yuntoken=msg[0];
e.devId=devId; e.devId=devId;