From 33719e5bba7a70300cf9216d06fdd2420ab147d1 Mon Sep 17 00:00:00 2001 From: Ctrlcvs <1509167646@qq.com> Date: Tue, 28 Mar 2023 17:10:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3`#=E6=89=AB=E7=A0=81=E7=BB=91?= =?UTF-8?q?=E5=AE=9A=E9=94=99=E8=AF=AF`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- model/mys/mihoyoApi.js | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/model/mys/mihoyoApi.js b/model/mys/mihoyoApi.js index 5814be0..c21071b 100644 --- a/model/mys/mihoyoApi.js +++ b/model/mys/mihoyoApi.js @@ -252,7 +252,7 @@ export default class miHoYoApi { }, getLtoken: { url: `${mys.pass_api}/account/auth/api/getLTokenBySToken`, - query: `${data.cookies}`, + query: `${data?.cookies?.replace(/;/g,'&')}`, }, //用于手动过验证码,账号密码登录需要 microgg: { @@ -305,7 +305,7 @@ export default class miHoYoApi { "order": data.order, "sign": this.gen_sign(data.order) }, - types:'web' + types:'pay' }, goodsList:{ url:`${mys.hk4_sdk}/hk4e_cn/mdk/shopwindow/shopwindow/fetchGoods`, @@ -316,12 +316,12 @@ export default class miHoYoApi { "uid": "1", "account": "1" }, - types:'web' + types:'pay' }, checkOrder:{ url:`${mys.hk4_sdk}/hk4e_cn/mdk/atropos/api/checkOrder`, query:`game=hk4e_cn®ion=${utils.getServer(data.uid)}&order_no=${data.order_no}&uid=${data.uid}`, - types:'web' + types:'pay' } } if (!urlMap[type]) return false @@ -473,21 +473,20 @@ export default class miHoYoApi { "x-rpc-device_model": utils.randomString(16), 'x-rpc-app_version': mys.APP_VERSION, 'x-rpc-game_biz': 'bbs_cn', + "x-rpc-sys_version": "11", "x-rpc-aigis": '', "Content-Type": "application/json;", "x-rpc-client_type": "2", "DS": this.getDs2('', body, mys.passSalt), "x-rpc-sdk_version": '1.3.1.2', - "User-Agent": "okhttp/4.9.3", - "Referer": "cors", - 'Host': 'passport-api.mihoyo.com', + "User-Agent": "okhttp/4.8.0", "Connection": 'Keep-Alive', "Accept-Encoding": "gzip, deflate, br", "x-rpc-channel": "appstore", Cookie: this.cookies, } break; - case "web": + case "pay": header={ "Accept": "application/json, text/plain, */*", "Accept-Encoding": "gzip, deflate, br",