修改判断
This commit is contained in:
parent
2d257f856a
commit
f5de75f47e
|
@ -348,7 +348,7 @@ export default class MysUser extends BaseModel {
|
|||
let ck = this.ck
|
||||
let url = {
|
||||
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 } })
|
||||
|
@ -373,7 +373,7 @@ export default class MysUser extends BaseModel {
|
|||
Connection: 'keep-alive',
|
||||
Host: 'bbs-api.mihoyo.com',
|
||||
Origin: 'https://m.bbs.mihoyo.com',
|
||||
Referer: ' https://m.bbs.mihoyo.com/'
|
||||
Referer: 'https://m.bbs.mihoyo.com/'
|
||||
}
|
||||
})
|
||||
if (!res.ok) return res
|
||||
|
@ -395,7 +395,6 @@ export default class MysUser extends BaseModel {
|
|||
return cache[game]
|
||||
}
|
||||
|
||||
|
||||
// 初始化数据
|
||||
async initDB(db = false) {
|
||||
if (this.db && !db) {
|
||||
|
@ -549,4 +548,4 @@ export default class MysUser extends BaseModel {
|
|||
let uids = this.uids[gameKey]
|
||||
return uids.includes(uid + '')
|
||||
}
|
||||
}
|
||||
}
|
|
@ -35,7 +35,7 @@ export default class apiTool {
|
|||
let urlMap = {
|
||||
genshin: {
|
||||
/** 体力接口fp参数用于避开验证码 */
|
||||
...(['cn_gf01', 'cn_qd01', 'prod_gf_cn', 'prod_qd_cn'].includes(this.server) ? {
|
||||
...(['cn_gf01', 'cn_qd01'].includes(this.server) ? {
|
||||
getFp: {
|
||||
url: `${hostPublicData}device-fp/api/getFp`,
|
||||
body: {
|
||||
|
@ -138,7 +138,7 @@ export default class apiTool {
|
|||
}
|
||||
},
|
||||
honkaisr: {
|
||||
...(['cn_gf01', 'cn_qd01', 'prod_gf_cn', 'prod_qd_cn'].includes(this.server) ? {
|
||||
...(['prod_gf_cn', 'prod_qd_cn'].includes(this.server) ? {
|
||||
UserGame: {
|
||||
url: `${host}binding/api/getUserGameRolesByCookie`,
|
||||
query: `game_biz=hkrpg_cn`
|
||||
|
|
Loading…
Reference in New Issue