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

支持#崩坏星穹铁道签到,需要在配置文件添加才能使用,/plugins/xiaoyao-cvs-plugin/config/config.yaml

This commit is contained in:
Ctrlcvs 2023-04-26 10:28:16 +08:00
parent d8b5da36f3
commit 4dcd63efe9
3 changed files with 32 additions and 1 deletions

View File

@ -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: {

View File

@ -20,6 +20,7 @@ signlist:
- 崩坏3
- 崩坏2
- 未定事件簿
- 崩坏星穹铁道
# 云原神是否自动签到
isCloudSign: false

View File

@ -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,