mirror of
https://github.com/ctrlcvs/xiaoyao-cvs-plugin.git
synced 2024-12-23 03:20:52 +08:00
fix 原神签到
This commit is contained in:
parent
674152e46b
commit
ef4c048a2e
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# 用户数据
|
||||||
|
data/
|
@ -42,16 +42,16 @@ let MysApi = {
|
|||||||
query = `uid=${uid}`;//米游社id
|
query = `uid=${uid}`;//米游社id
|
||||||
break;
|
break;
|
||||||
case "bbs_sign_info":
|
case "bbs_sign_info":
|
||||||
url += "/event/bbs_sign_reward/info";
|
url += "/event/luna/info";
|
||||||
query = `act_id=e202009291139501®ion=${server}&uid=${uid}`;
|
query = `act_id=e202311201442471®ion=${server}&uid=${uid}`;
|
||||||
break;
|
break;
|
||||||
case "bbs_sign_home":
|
case "bbs_sign_home":
|
||||||
url += "/event/bbs_sign_reward/home";
|
url += "/event/luna/home";
|
||||||
query = `act_id=e202009291139501®ion=${server}&uid=${uid}`;
|
query = `act_id=e202311201442471®ion=${server}&uid=${uid}`;
|
||||||
break;
|
break;
|
||||||
case "bbs_sign":
|
case "bbs_sign":
|
||||||
url += "/event/bbs_sign_reward/sign";
|
url += "/event/luna/sign";
|
||||||
body = JSON.stringify({ act_id: "e202009291139501", region: server, uid: uid, });
|
body = JSON.stringify({ act_id: "e202311201442471", region: server, uid: uid, });
|
||||||
break;
|
break;
|
||||||
case "ys_ledger":
|
case "ys_ledger":
|
||||||
url = "https://hk4e-api.mihoyo.com/event/ys_ledger/monthInfo";
|
url = "https://hk4e-api.mihoyo.com/event/ys_ledger/monthInfo";
|
||||||
|
@ -371,7 +371,6 @@ export default class miHoYoApi {
|
|||||||
'accept-language': 'zh-CN,zh;q=0.9,ja-JP;q=0.8,ja;q=0.7,en-US;q=0.6,en;q=0.5',
|
'accept-language': 'zh-CN,zh;q=0.9,ja-JP;q=0.8,ja;q=0.7,en-US;q=0.6,en;q=0.5',
|
||||||
'x-rpc-device_id': DEVICE_ID,
|
'x-rpc-device_id': DEVICE_ID,
|
||||||
'User-Agent': `Mozilla/5.0 (iPhone; CPU iPhone OS 14_0_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) miHoYoBBS/${mys.APP_VERSION}`,
|
'User-Agent': `Mozilla/5.0 (iPhone; CPU iPhone OS 14_0_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) miHoYoBBS/${mys.APP_VERSION}`,
|
||||||
Referer: board.getReferer(),
|
|
||||||
Host: 'api-takumi.mihoyo.com',
|
Host: 'api-takumi.mihoyo.com',
|
||||||
'x-rpc-channel': 'appstore',
|
'x-rpc-channel': 'appstore',
|
||||||
'x-rpc-app_version': mys.APP_VERSION,
|
'x-rpc-app_version': mys.APP_VERSION,
|
||||||
@ -379,7 +378,14 @@ export default class miHoYoApi {
|
|||||||
'x-rpc-client_type': '5',
|
'x-rpc-client_type': '5',
|
||||||
'Content-Type': 'application/json;charset=UTF-8',
|
'Content-Type': 'application/json;charset=UTF-8',
|
||||||
DS: this.getDs(),
|
DS: this.getDs(),
|
||||||
'Cookie': this.cookie
|
'Cookie': this.cookie,
|
||||||
|
...(board.key === 'genshin'? {
|
||||||
|
'x-rpc-signgame': 'hk4e',
|
||||||
|
'Origin': 'htps://act.mihoyo.com',
|
||||||
|
'Referer': 'https://act.mihoyo.com/',
|
||||||
|
} : {
|
||||||
|
Referer: board.getReferer(),
|
||||||
|
})
|
||||||
}
|
}
|
||||||
if (this.isOs) {
|
if (this.isOs) {
|
||||||
let os_Header = {
|
let os_Header = {
|
||||||
|
@ -68,7 +68,7 @@ const boards = {
|
|||||||
key: 'genshin',
|
key: 'genshin',
|
||||||
biz: 'hk4e_cn',
|
biz: 'hk4e_cn',
|
||||||
osbiz: 'hk4e_global',
|
osbiz: 'hk4e_global',
|
||||||
actid: 'e202009291139501',
|
actid: 'e202311201442471',
|
||||||
name: '原神',
|
name: '原神',
|
||||||
url: "https://bbs.mihoyo.com/ys/",
|
url: "https://bbs.mihoyo.com/ys/",
|
||||||
signUrl(data, type, api) {
|
signUrl(data, type, api) {
|
||||||
@ -76,13 +76,13 @@ const boards = {
|
|||||||
switch (type) {
|
switch (type) {
|
||||||
case "isSign":
|
case "isSign":
|
||||||
dataUrl = {
|
dataUrl = {
|
||||||
url: `${api}/event/bbs_sign_reward/info`,
|
url: `${api}/event/luna/info`,
|
||||||
query: `region=${data.region}&act_id=${this.actid}&uid=${data.game_uid}`
|
query: `region=${data.region}&act_id=${this.actid}&uid=${data.game_uid}`
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "sign":
|
case "sign":
|
||||||
dataUrl = {
|
dataUrl = {
|
||||||
url: `${api}/event/bbs_sign_reward/sign`,
|
url: `${api}/event/luna/sign`,
|
||||||
body: {
|
body: {
|
||||||
region: data.region,
|
region: data.region,
|
||||||
act_id: this.actid,
|
act_id: this.actid,
|
||||||
@ -92,7 +92,7 @@ const boards = {
|
|||||||
break;
|
break;
|
||||||
case "home":
|
case "home":
|
||||||
dataUrl = {
|
dataUrl = {
|
||||||
url: `${api}/event/bbs_sign_reward/home`,
|
url: `${api}/event/luna/home`,
|
||||||
query: `act_id=${this.actid}`
|
query: `act_id=${this.actid}`
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user