diff --git a/Application/Admin/Controller/GameApiController.class.php b/Application/Admin/Controller/GameApiController.class.php index 6613e972f..4179850e9 100644 --- a/Application/Admin/Controller/GameApiController.class.php +++ b/Application/Admin/Controller/GameApiController.class.php @@ -67,6 +67,22 @@ class GameApiController extends Think { public function send() { + $giftItem = [ + 'id' => 32, + 'index' => 0, + ]; + $order = [ + 'id' => 1, + 'role_id' => '4294970300', + 'server_id' => '1', + 'user_id' => '402903', + ]; + $client = new GameResource\YjlyClient(); + $result = $client->sendEmail($giftItem, $order); + var_dump($result); + + return; + // 13110873520 // user_id 402903 // role_id 4294970300 diff --git a/Application/Base/Tool/GameResource/YjlyClient.class.php b/Application/Base/Tool/GameResource/YjlyClient.class.php index 830708229..abe54fd23 100644 --- a/Application/Base/Tool/GameResource/YjlyClient.class.php +++ b/Application/Base/Tool/GameResource/YjlyClient.class.php @@ -12,9 +12,9 @@ use GuzzleHttp\Exception\RequestException; */ class YjlyClient { - const APP_ID = ''; + const APP_ID = 'A86C68D2BD587CEC6'; const SIGN_NAME = 'sign'; - const SIGN_KEY = 'nmjf65532qavdfsdq962dddsddfsaffd'; + const SIGN_KEY = 'CxYQEh4tU1gnXFUJGC0gBjI='; protected $client; protected $baseUrl = 'https://x2centerapi.xiaoxixinxi.com'; @@ -108,6 +108,10 @@ class YjlyClient } // 测试资源 + + /** + * @throws Exception + */ public function apply($order, $role) { throw new Exception('没有接口');