mirror of
https://github.com/ctrlcvs/xiaoyao-cvs-plugin.git
synced 2024-12-23 11:40:51 +08:00
补充崩2签到接口
This commit is contained in:
parent
517678f9f5
commit
65ad5c203c
@ -25,7 +25,7 @@ export class atlas extends plugin {
|
|||||||
e.getMysApi = async function (cfg) {
|
e.getMysApi = async function (cfg) {
|
||||||
return await getMysApi(e, cfg)
|
return await getMysApi(e, cfg)
|
||||||
}
|
}
|
||||||
msg = '#' + msg.replace('#', '')
|
msg = '#' + msg.replace(/#|#/, '').trim()
|
||||||
for (let fn in Atlas.rule) {
|
for (let fn in Atlas.rule) {
|
||||||
let cfg = Atlas.rule[fn]
|
let cfg = Atlas.rule[fn]
|
||||||
if (Atlas[fn] && new RegExp(cfg.reg).test(msg)) {
|
if (Atlas[fn] && new RegExp(cfg.reg).test(msg)) {
|
||||||
|
@ -113,11 +113,11 @@ export default class MihoYoApi {
|
|||||||
message: `未绑定${this.msgName}信息`
|
message: `未绑定${this.msgName}信息`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// // 获取签到信息和奖励信息 、、后续重新梳理补充
|
// 获取签到信息和奖励信息 、、后续重新梳理补充
|
||||||
// const {
|
// const {
|
||||||
// name,
|
// name,
|
||||||
// count
|
// count
|
||||||
// } = await this.getHonkai3rdSignInfo(game_uid, region, nickname, boards.honkai3rd)
|
// } = await this.getHonkai3rdSignInfo(objData.game_uid, objData.region, objData.nickname, boards.honkai3rd)
|
||||||
// if (!name) {
|
// if (!name) {
|
||||||
// return {
|
// return {
|
||||||
// message: `获取签到信息和奖励信息异常`
|
// message: `获取签到信息和奖励信息异常`
|
||||||
@ -346,12 +346,19 @@ export default class MihoYoApi {
|
|||||||
}
|
}
|
||||||
// 游戏签到操作
|
// 游戏签到操作
|
||||||
async postSign(board, game_uid, region) {
|
async postSign(board, game_uid, region) {
|
||||||
|
let web_api=`https://api-takumi.mihoyo.com`
|
||||||
let url =
|
let url =
|
||||||
`https://api-takumi.mihoyo.com/common/eutheniav2/sign`
|
`${web_api}/common/eutheniav2/sign`
|
||||||
if(board.name=="原神"){
|
if(board.name=="原神"){
|
||||||
url=`https://api-takumi.mihoyo.com/event/bbs_sign_reward/sign`
|
url=`${web_api}/event/bbs_sign_reward/sign`
|
||||||
|
}
|
||||||
|
if(board.name=="崩坏2"||board.name=="未定事件簿"){
|
||||||
|
url=`${web_api}/event/luna/info?lang=zh-cn`
|
||||||
}
|
}
|
||||||
url+=`?region=${region}&act_id=${board.actid}&uid=${game_uid}`
|
url+=`?region=${region}&act_id=${board.actid}&uid=${game_uid}`
|
||||||
|
// if(board.name==="崩坏3"){
|
||||||
|
// url=`https://webstatic.mihoyo.com/bh3/event/signin-cn/index.html?bbs_presentation_style=fullscreen&bbs_game_role_required=bh3_cn&bbs_auth_required=true&act_id=${board.actid}&utm_source=bbs&utm_medium=mys&utm_campaign=icon`
|
||||||
|
// }
|
||||||
// console.log(url)
|
// console.log(url)
|
||||||
// console.log(this.e)
|
// console.log(this.e)
|
||||||
let res = await superagent.post(url).set(this.getpubHeaders(board)).timeout(10000);
|
let res = await superagent.post(url).set(this.getpubHeaders(board)).timeout(10000);
|
||||||
|
Loading…
Reference in New Issue
Block a user