接口概述
本接口为 GTA Online 佩里科岛抢劫分红计算专用API,支持自定义难度、目标、分红比例,精准计算所有玩家最终收益,支持跨域调用,适用于网站、小程序、APP等全平台对接。
接口地址:https://damm1.com/jsq/api
基础信息
| 项目 | 详情 |
|---|---|
| 接口名称 | 佩里科岛抢劫分红计算 |
| 请求方式 | POST |
| 数据格式 | application/json |
| 跨域支持 | 支持(全平台可调用) |
请求头(必填)
Content-Type: application/json
请求参数
| 字段名 | 类型 | 必填 | 说明 | 可选值/规则 |
|---|---|---|---|---|
| difficulty | string | 是 | 游戏难度 | normal(普通)、hard(困难) |
| mainTarget | string | 是 | 主要目标 | tequila/necklace/bond/diamond/statue |
| eliteChallenge | boolean | 是 | 精英挑战 | true、false |
| resellFee | number | 是 | 倒卖手续费 | 0~20 |
| pavelCut | number | 是 | 帕维尔分成 | 0~20 |
| playerCount | number | 是 | 玩家人数 | 1~4 |
| playerPercentages | array | 是 | 分红比例 | 数组长度=人数 |
| secondaryTargets | object | 是 | 次要目标 | 现金/大麻/可卡因/黄金/画作/保险箱 |
请求示例
CURL 命令
curl -X POST https://damm1.com/jsq/api \
-H "Content-Type: application/json" \
-d '{
"difficulty": "hard",
"mainTarget": "statue",
"eliteChallenge": true,
"resellFee": 10,
"pavelCut": 2,
"playerCount": 4,
"playerPercentages": [40,25,25,10],
"secondaryTargets": {
"cash": 2,
"cocaine": 1,
"gold": 0,
"painting": 0,
"weed": 1,
"safeCash": 50000
}
}'
JavaScript / Axios
async function calculatePayout() {
try {
const res = await axios.post("https://damm1.com/jsq/api", {
difficulty: "hard",
mainTarget: "statue",
eliteChallenge: true,
resellFee: 10,
pavelCut: 2,
playerCount: 4,
playerPercentages: [40,25,25,10],
secondaryTargets: {
cash: 2,
cocaine: 1,
gold: 0,
painting: 0,
weed: 1,
safeCash: 50000
}
});
console.log("计算结果:", res.data);
return res.data;
} catch (err) {
console.error("调用失败:", err);
}
}
PHP
"hard",
"mainTarget" => "statue",
"eliteChallenge" => true,
"resellFee" => 10,
"pavelCut" => 2,
"playerCount" => 4,
"playerPercentages" => [40,25,25,10],
"secondaryTargets" => [
"cash" => 2,
"cocaine" => 1,
"gold" => 0,
"painting" => 0,
"weed" => 1,
"safeCash" => 50000
]
];
$options = [
'http' => [
'header' => "Content-Type: application/json\r\n",
'method' => 'POST',
'content' => json_encode($data)
]
];
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
echo $result;
?>
Python
import requests
url = "https://damm1.com/jsq/api"
data = {
"difficulty": "hard",
"mainTarget": "statue",
"eliteChallenge": True,
"resellFee": 10,
"pavelCut": 2,
"playerCount": 4,
"playerPercentages": [40,25,25,10],
"secondaryTargets": {
"cash": 2,
"cocaine": 1,
"gold": 0,
"painting": 0,
"weed": 1,
"safeCash": 50000
}
}
response = requests.post(url, json=data)
print(response.json())
响应参数
| 字段名 | 类型 | 说明 |
|---|---|---|
| success | boolean | 请求状态 |
| data.mainTargetValue | number | 主要目标价值 |
| data.secondaryTotal | number | 次要目标总价值 |
| data.totalDistributable | number | 可分配总金额 |
| data.playerPayouts | array | 各玩家最终分红 |
响应示例
成功响应
{
"success": true,
"data": {
"mainTargetValue": 2090000,
"secondaryTotal": 589483,
"eliteBonus": 100000,
"grossProfit": 2779483,
"resellFeeDeduction": 277948,
"pavelCutDeduction": 55590,
"totalDistributable": 2445945,
"playerPayouts": [978378, 611486, 611486, 244595]
}
}
失败响应
{
"success": false,
"message": "参数错误:难度只能是normal(普通)或hard(困难)"
}
常见错误
| 错误信息 | 错误原因 |
|---|---|
| 难度只能是normal/hard | difficulty参数填写错误 |
| 主要目标不合法 | mainTarget参数填写错误 |
| 人数/分红比例错误 | 人数与分红数组长度不匹配 |
| 比例必须0-20 | 手续费/分成超出范围 |
注意事项
- 接口仅支持 POST 请求,浏览器直接打开显示 403/404 属于正常现象
- 所有参数严格按照格式填写,数字类型请勿添加引号
- 分红比例数组长度必须与玩家人数完全一致
- 接口已开启跨域,前端、小程序、APP、服务器均可直接调用
- 计算逻辑与游戏官方数据完全同步,结果精准无误