From 39341ed59a4142d836f9f52d8b739d6f6b7d13cf Mon Sep 17 00:00:00 2001 From: ctrlcvs <1509167646@qq.com> Date: Sat, 17 Sep 2022 22:59:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E8=B0=83=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- model/mys/mihoyo-api.js | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 3c86529..0dd0a0a 100644 --- a/README.md +++ b/README.md @@ -73,4 +73,4 @@ cnpm i promise-retry - 严禁用于任何商业用途和非法行为 - Yunzai-Bot 官方QQ群:213938015 (暂时停止新加入) - 喵喵Miao-Plugin QQ群:607710456 (暂时停止新加入) -- 图鉴xiaoyao-cvs-Plugin QQ群:[544570609](https://jq.qq.com/?_wv=1027&k=GOHommWT) +- 图鉴xiaoyao-cvs-Plugin QQ群:544570609(暂时不支持加入) diff --git a/model/mys/mihoyo-api.js b/model/mys/mihoyo-api.js index 19899c3..3a16233 100644 --- a/model/mys/mihoyo-api.js +++ b/model/mys/mihoyo-api.js @@ -25,6 +25,7 @@ const _path = process.cwd(); let YamlDataUrl = `${_path}/plugins/xiaoyao-cvs-plugin/data/yaml`; let web_api = `https://api-takumi.mihoyo.com` let hk4_api = `https://hk4e-api.mihoyo.com`; +let bbs_api=`https://bbs-api.mihoyo.com`; // 米游社的版块 const boards = { honkai3rd: { @@ -200,14 +201,14 @@ export default class MihoYoApi { async forumPostList(forumId) { const url = - `https://api-takumi.mihoyo.com/post/api/getForumPostList?forum_id=${forumId}&is_good=false&is_hot=false&page_size=20&sort_type=1`; + `${web_api}/post/api/getForumPostList?forum_id=${forumId}&is_good=false&is_hot=false&page_size=20&sort_type=1`; let res = await superagent.get(url).set(this._getHeader()).timeout(10000); let resObj = JSON.parse(res.text); return resObj; } async forumPostDetail(postId) { - const url = `https://api-takumi.mihoyo.com/post/api/getPostFull?post_id=${postId}`; + const url = `${bbs_api}/post/api/getPostFull?post_id=${postId}`; let res = await superagent.get(url).set(this._getHeader()).timeout(10000); let resObj = JSON.parse(res.text); return resObj; @@ -215,13 +216,13 @@ export default class MihoYoApi { async forumPostShare(postId) { const url = - `https://api-takumi.mihoyo.com/apihub/api/getShareConf?entity_id=${postId}&entity_type=1`; + `${web_api}/apihub/api/getShareConf?entity_id=${postId}&entity_type=1`; let res = await superagent.get(url).set(this._getHeader()).timeout(10000); let resObj = JSON.parse(res.text); return resObj; } async forumPostVote(postId) { - const url = `https://api-takumi.mihoyo.com/apihub/sapi/upvotePost`; + const url = `${web_api}/apihub/sapi/upvotePost`; const upvotePostData = { "post_id": postId, "is_cancel": false