2
0
mirror of https://github.com/ctrlcvs/xiaoyao-cvs-plugin.git synced 2024-12-23 03:20:52 +08:00

修正接口

This commit is contained in:
Ctrlcvs 2022-08-04 16:57:12 +08:00 committed by leiyilu
parent c90a620791
commit e072452cd4

View File

@ -133,7 +133,7 @@ export default class MihoYoApi {
const url = `https://api-takumi.mihoyo.com/apihub/sapi/signIn?gids=${forumId}`; const url = `https://api-takumi.mihoyo.com/apihub/sapi/signIn?gids=${forumId}`;
let res = await superagent.post(url).set(this._getHeader()).timeout(10000); let res = await superagent.post(url).set(this._getHeader()).timeout(10000);
let resObj = JSON.parse(res.text); let resObj = JSON.parse(res.text);
// Bot.logger.mark(`ForumSign: ${res.text}`); Bot.logger.mark(`ForumSign: ${res.text}`);
return resObj; return resObj;
} }
@ -384,14 +384,10 @@ export default class MihoYoApi {
url = `${web_api}/event/bbs_sign_reward/sign` url = `${web_api}/event/bbs_sign_reward/sign`
} }
if (board.name == "崩坏2" || board.name == "未定事件簿") { if (board.name == "崩坏2" || board.name == "未定事件簿") {
url = `${web_api}/event/luna/info?lang=zh-cn` url = `${web_api}/event/luna/sign`
} }
url += `?region=${region}&act_id=${board.actid}&uid=${game_uid}` url += `?region=${region}&act_id=${board.actid}&uid=${game_uid}`
// if (board.name === "崩坏3") { let res= await superagent.post(url).set(this.getpubHeaders(board)).timeout(10000);
// url = `${web_api}/event/luna/info?lang=zh-cn&region=${region}&act_id=${board.actid}&uid=${game_uid}`
// }
// console.log(this.e)
let res = await superagent.post(url).set(this.getpubHeaders(board)).timeout(10000);
let resObj = JSON.parse(res.text); let resObj = JSON.parse(res.text);
return resObj return resObj
} }