fix: api url changed (#71)

This commit is contained in:
mio
2024-08-01 18:37:24 +08:00
parent 60bc7b43ee
commit 9dab8bd891
3 changed files with 1987 additions and 2184 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "star-rail-warp-export", "name": "star-rail-warp-export",
"version": "0.1.7", "version": "0.1.8",
"main": "./dist/electron/main/main.js", "main": "./dist/electron/main/main.js",
"author": "biuuu <https://github.com/biuuu>", "author": "biuuu <https://github.com/biuuu>",
"homepage": "https://github.com/biuuu/star-rail-warp-export", "homepage": "https://github.com/biuuu/star-rail-warp-export",

View File

@ -289,9 +289,9 @@ const getQuerystring = (url) => {
const text = i18n.log const text = i18n.log
const { searchParams, host } = new URL(fixAuthkey(url)) const { searchParams, host } = new URL(fixAuthkey(url))
if (host.includes('webstatic-sea') || host.includes('hkrpg-api-os') || host.includes('api-os-takumi') || host.includes('hoyoverse.com')) { if (host.includes('webstatic-sea') || host.includes('hkrpg-api-os') || host.includes('api-os-takumi') || host.includes('hoyoverse.com')) {
apiDomain = 'https://api-os-takumi.mihoyo.com' apiDomain = 'https://public-operation-hkrpg-sg.hoyoverse.com'
} else { } else {
apiDomain = 'https://api-takumi.mihoyo.com' apiDomain = 'https://public-operation-hkrpg.mihoyo.com'
} }
const authkey = searchParams.get('authkey') const authkey = searchParams.get('authkey')
if (!authkey) { if (!authkey) {
@ -417,6 +417,7 @@ const fetchData = async (urlOverride) => {
let originTimeZone = '' let originTimeZone = ''
for (const type of gachaType) { for (const type of gachaType) {
const { list, uid, region, region_time_zone } = await getGachaLogs(type, queryString) const { list, uid, region, region_time_zone } = await getGachaLogs(type, queryString)
await sleep(0.3)
const logs = list.map((item) => { const logs = list.map((item) => {
const { id, item_id, item_type, name, rank_type, time, gacha_id, gacha_type } = item const { id, item_id, item_type, name, rank_type, time, gacha_id, gacha_type } = item
return { id, item_id, item_type, name, rank_type, time, gacha_id, gacha_type } return { id, item_id, item_type, name, rank_type, time, gacha_id, gacha_type }

4164
yarn.lock

File diff suppressed because it is too large Load Diff