修改判断

This commit is contained in:
kissnavel 2024-05-05 18:45:56 +08:00
parent 2d257f856a
commit f5de75f47e
2 changed files with 5 additions and 6 deletions

View File

@ -348,7 +348,7 @@ export default class MysUser extends BaseModel {
let ck = this.ck let ck = this.ck
let url = { let url = {
mys: 'https://api-takumi.mihoyo.com/binding/api/getUserGameRolesByCookie', mys: 'https://api-takumi.mihoyo.com/binding/api/getUserGameRolesByCookie',
hoyolab: 'https://api-os-takumi.mihoyo.com/binding/api/getUserGameRolesByCookie' hoyolab: 'https://sg-public-api.hoyolab.com/binding/api/getUserGameRolesByCookie'
} }
let res = await fetch(url[serv], { method: 'get', headers: { Cookie: ck } }) let res = await fetch(url[serv], { method: 'get', headers: { Cookie: ck } })
@ -395,7 +395,6 @@ export default class MysUser extends BaseModel {
return cache[game] return cache[game]
} }
// 初始化数据 // 初始化数据
async initDB(db = false) { async initDB(db = false) {
if (this.db && !db) { if (this.db && !db) {

View File

@ -35,7 +35,7 @@ export default class apiTool {
let urlMap = { let urlMap = {
genshin: { genshin: {
/** 体力接口fp参数用于避开验证码 */ /** 体力接口fp参数用于避开验证码 */
...(['cn_gf01', 'cn_qd01', 'prod_gf_cn', 'prod_qd_cn'].includes(this.server) ? { ...(['cn_gf01', 'cn_qd01'].includes(this.server) ? {
getFp: { getFp: {
url: `${hostPublicData}device-fp/api/getFp`, url: `${hostPublicData}device-fp/api/getFp`,
body: { body: {
@ -138,7 +138,7 @@ export default class apiTool {
} }
}, },
honkaisr: { honkaisr: {
...(['cn_gf01', 'cn_qd01', 'prod_gf_cn', 'prod_qd_cn'].includes(this.server) ? { ...(['prod_gf_cn', 'prod_qd_cn'].includes(this.server) ? {
UserGame: { UserGame: {
url: `${host}binding/api/getUserGameRolesByCookie`, url: `${host}binding/api/getUserGameRolesByCookie`,
query: `game_biz=hkrpg_cn` query: `game_biz=hkrpg_cn`