From 4dcd63efe99178610e7c546beaf47a44b58deffd Mon Sep 17 00:00:00 2001 From: Ctrlcvs <1509167646@qq.com> Date: Wed, 26 Apr 2023 10:28:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81`#=E5=B4=A9=E5=9D=8F=E6=98=9F?= =?UTF-8?q?=E7=A9=B9=E9=93=81=E9=81=93=E7=AD=BE=E5=88=B0`,=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E5=9C=A8=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=89=8D=E8=83=BD=E4=BD=BF=E7=94=A8=EF=BC=8C`/plugins?= =?UTF-8?q?/xiaoyao-cvs-plugin/config/config.yaml`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/sign.js | 2 +- defSet/config/config.yaml | 1 + model/mys/mysTool.js | 30 ++++++++++++++++++++++++++++++ 3 files changed, 32 insertions(+), 1 deletion(-) diff --git a/apps/sign.js b/apps/sign.js index 1677c1c..8e8cd03 100644 --- a/apps/sign.js +++ b/apps/sign.js @@ -2,7 +2,7 @@ import User from "../model/user.js" import moment from 'moment'; export const rule = { sign: { - reg: `^#*(原神|崩坏3|崩坏2|未定事件簿)签到$`, + reg: `^#*(原神|崩坏3|崩坏2|未定事件簿|崩坏星穹铁道)签到$`, describe: "米社规则签到" }, bbsSign: { diff --git a/defSet/config/config.yaml b/defSet/config/config.yaml index 7d74022..c672bd9 100644 --- a/defSet/config/config.yaml +++ b/defSet/config/config.yaml @@ -20,6 +20,7 @@ signlist: - 崩坏3 - 崩坏2 - 未定事件簿 + - 崩坏星穹铁道 # 云原神是否自动签到 isCloudSign: false diff --git a/model/mys/mysTool.js b/model/mys/mysTool.js index bf417a0..1be7401 100644 --- a/model/mys/mysTool.js +++ b/model/mys/mysTool.js @@ -197,11 +197,41 @@ const boards = { honkaisr: { forumid: 52, name: '崩坏星穹铁道', + actid: 'e202304121516551', + biz:'hkrpg_cn', url: "https://bbs.mihoyo.com/sr/", signUrl(data, type, api) { //预留方法方便后续迭代 let dataUrl = {} + switch (type) { + case "isSign": + dataUrl = { + url: `${api}/event/luna/info`, + query: `region=${data.region}&act_id=${this.actid}&uid=${data.game_uid}` + } + break; + case "sign": + dataUrl = { + url: `${api}/event/luna/sign`, + body: { + region: data.region, + act_id: this.actid, + uid: data.game_uid + } + } + break; + case "home": + dataUrl = { + url: `${api}/event/luna/home`, + query: `act_id=${this.actid}` + } + break; + } + dataUrl['types'] = 'sign' return dataUrl }, + getReferer() { + return `https://webstatic.mihoyo.com/bbs/event/signin/hkrpg/index.html?bbs_auth_required=true&act_id=${this.actid}&bbs_auth_required=true&bbs_presentation_style=fullscreen&utm_source=h5&utm_medium=mys&utm_campaign=zj` + } }, zzz: { forumid: 57,