1.新增游戏管理接口和菜单

2.创建对接第三方文档
This commit is contained in:
2026-04-22 18:44:55 +08:00
parent d3ee3faec4
commit 40277e677d
14 changed files with 1373 additions and 1 deletions

View File

@@ -0,0 +1,42 @@
<?php
declare(strict_types=1);
/**
* 生成 /api/v1/authToken或 /api/v1/authtoken所需 signature
*
* 用法:
* php scripts/gen_auth_token_signature.php --agent_id=1001 --secret=your_secret
* php scripts/gen_auth_token_signature.php --agent_id=1001 --secret=your_secret --time=1713772800
*/
$options = getopt('', ['agent_id:', 'secret:', 'time::']);
$agentId = $options['agent_id'] ?? '';
$secret = $options['secret'] ?? '';
$time = $options['time'] ?? (string) time();
if ($agentId === '' || $secret === '' || $time === '') {
echo "缺少参数。\n";
echo "用法: php scripts/gen_auth_token_signature.php --agent_id=1001 --secret=your_secret [--time=unix_timestamp]\n";
exit(1);
}
if (ctype_digit($time) === false) {
echo "time 必须是 unix 时间戳(纯数字字符串)。\n";
exit(1);
}
$signature = md5($agentId . $secret . $time);
$query = http_build_query([
'agent_id' => $agentId,
'secret' => $secret,
'time' => $time,
'signature' => $signature,
]);
echo "agent_id: {$agentId}\n";
echo "secret: {$secret}\n";
echo "time: {$time}\n";
echo "signature: {$signature}\n";
echo "query: {$query}\n";