feat:国际服 抽卡链接 & 抽卡分析

This commit is contained in:
kissnavel 2025-08-24 22:04:28 +08:00
parent 607b85c922
commit 6c475878a7
4 changed files with 33 additions and 28 deletions

View file

@ -1,4 +1,4 @@
import { ZZZ_GET_GACHA_LOG_API } from '../mysapi/api.js';
import { ZZZ_GET_GACHA_LOG_API, ZZZ_GET_GACHA_OS_LOG_API } from '../mysapi/api.js';
import request from '../../utils/request.js';
import { ZZZGachaLogResp } from '../../model/gacha.js';
@ -18,11 +18,12 @@ export const getZZZGachaLink = async (
initLogGachaBaseType = '2',
page = 1,
endId = '0',
size = '20'
serverId,
game_biz
) => {
// 暂时直接写死服务器为国服
const serverId = 'prod_gf_cn';
const url = ZZZ_GET_GACHA_LOG_API;
const region = serverId || 'prod_gf_cn'
const gamebiz = game_biz || 'nap_cn'
const url = gamebiz == 'nap_global' ? ZZZ_GET_GACHA_OS_LOG_API : ZZZ_GET_GACHA_LOG_API
const timestamp = Math.floor(Date.now() / 1000);
// 请求参数
const params = new URLSearchParams({
@ -36,13 +37,13 @@ export const getZZZGachaLink = async (
lang: 'zh-cn',
device_type: 'mobile',
plat_type: 'ios',
region: serverId,
region: region,
authkey: authKey,
game_biz: 'nap_cn',
game_biz: gamebiz,
gacha_type: gachaType,
real_gacha_type: initLogGachaBaseType,
page: page,
size: size,
size: '20',
end_id: endId,
});
// 完整链接
@ -63,7 +64,9 @@ export const getZZZGachaLogByAuthkey = async (
gachaType = '2001',
initLogGachaBaseType = '2',
page = 1,
endId = '0'
endId = '0',
region,
game_biz
) => {
// 获取抽卡链接
const link = await getZZZGachaLink(
@ -71,7 +74,9 @@ export const getZZZGachaLogByAuthkey = async (
gachaType,
initLogGachaBaseType,
page,
endId
endId,
region,
game_biz
);
// 发送请求
const response = await request(link, {