hxp
2025-02-17 6c4492a73f0c57ef2a7676ae1788500c6cfb5235
10395 【GM版】新渠道游戏GM版本(优化支持按pid取不同key)
5个文件已修改
30 ■■■■■ 已修改文件
InterfaceConfig.php 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/gmgame/clear_bag.php 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/gmgame/paygmgame.php 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/gmgame/query_role.php 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/gmgame/send_item.php 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
InterfaceConfig.php
@@ -163,8 +163,12 @@
TestAllow=1
[gmgame]
Md5_Key=liwhn0emwotwxqxpdwa9jlsuwkvaqa1c
Callback_Key=32203045955147303357927711850104
;pid1
Md5_1_Key=liwhn0emwotwxqxpdwa9jlsuwkvaqa1c
Callback_1_Key=32203045955147303357927711850104
;pid2
Md5_2_Key=liwhn0emwotwxqxpdwa9jlsuwkvaqa1c
Callback_2_Key=32203045955147303357927711850104
;发放道具邮件标题
Senditem_mail_title=GM发放道具
Senditem_mail_content=GM通过邮件给您发放了道具,请注意查收!
api/gmgame/clear_bag.php
@@ -10,7 +10,8 @@
// https://www.eolink.com/share/inside/Yk3vUm/api/844628/detail/3309969
\Logging\CreateLogging("gmgame.clear_bag.php");
\Logging\LogInfo("_POST: " . print_r($_POST, true));
$pid = $_GET["pid"];
\Logging\LogInfo("_POST: " . print_r($_POST, true) . " pid:" . $pid);
$role_id = $_POST["role_id"]; // 角色ID
$server_id = $_POST["server_id"]; // 游戏区服ID
@@ -20,7 +21,7 @@
if (
    !\CfgReader\ReadConfig()
    || !\CfgReader\GetConfigData("gmgame", "Md5_Key", $Md5_Key)
    || !\CfgReader\GetConfigData("gmgame", "Md5_" . $pid . "_Key", $Md5_Key)
) {
    retFail("CfgError");
    exit;
api/gmgame/paygmgame.php
@@ -36,7 +36,8 @@
} else {
    $postData = $_POST;
}
\Logging\LogInfo("postData: " . print_r($postData, true));
$pid = $_GET["pid"];
\Logging\LogInfo("postData: " . print_r($postData, true) . " pid:" . $pid);
$nt_data = $postData['nt_data'];
$sign = $postData['sign'];
@@ -48,8 +49,8 @@
if (
    !\CfgReader\ReadConfig()
    || !\CfgReader\GetConfigData("gmgame", "Md5_Key", $Md5_Key)
    || !\CfgReader\GetConfigData("gmgame", "Callback_Key", $Callback_Key)
    || !\CfgReader\GetConfigData("gmgame", "Md5_" . $pid . "_Key", $Md5_Key)
    || !\CfgReader\GetConfigData("gmgame", "Callback_" . $pid . "_Key", $Callback_Key)
) {
    Ret("CfgError");
    exit;
api/gmgame/query_role.php
@@ -9,7 +9,8 @@
// https://www.eolink.com/share/inside/Yk3vUm/api/844628/detail/3309842
\Logging\CreateLogging("gmgame.query_role.php");
\Logging\LogInfo("_POST: " . print_r($_POST, true));
$pid = $_GET["pid"];
\Logging\LogInfo("_POST: " . print_r($_POST, true) . " pid:" . $pid);
$user = $_POST["user"]; // {channel}_{user_id},quick渠道ID_sdk账号ID
$server_id = $_POST["server_id"]; // 游戏区服ID
@@ -20,7 +21,7 @@
if (
    !\CfgReader\ReadConfig()
    || !\CfgReader\GetConfigData("gmgame", "Md5_Key", $Md5_Key)
    || !\CfgReader\GetConfigData("gmgame", "Md5_" . $pid . "_Key", $Md5_Key)
) {
    retFail("CfgError");
    exit;
api/gmgame/send_item.php
@@ -10,7 +10,8 @@
// https://www.eolink.com/share/inside/Yk3vUm/api/844628/detail/3309978
\Logging\CreateLogging("gmgame.send_item.php");
\Logging\LogInfo("_POST: " . print_r($_POST, true));
$pid = $_GET["pid"];
\Logging\LogInfo("_POST: " . print_r($_POST, true) . " pid:" . $pid);
$role_id = $_POST["role_id"]; // 角色ID
$server_id = $_POST["server_id"]; // 游戏区服ID
@@ -23,7 +24,7 @@
if (
    !\CfgReader\ReadConfig()
    || !\CfgReader\GetConfigData("gmgame", "Md5_Key", $Md5_Key)
    || !\CfgReader\GetConfigData("gmgame", "Md5_" . $pid . "_Key", $Md5_Key)
    || !\CfgReader\GetConfigData("gmgame", "Senditem_mail_title", $title)
    || !\CfgReader\GetConfigData("gmgame", "Senditem_mail_content", $content)
) {