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,