Commit 6e80b26e authored by 杨培's avatar 杨培

实例参考

其它调整
parent 04db65a1
<?php
/**
* Created by PhpStorm.
* User: pader
* Date: 2017/6/28
* Time: 13:51
*/
require __DIR__.'/../src/autoload.php';
\internalApi\base\Client::config(include __DIR__.'/../src/client_config_dev.php');
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: pader
* Date: 2017/6/28
* Time: 13:51
*/
use internalApi\code\Medal;
require __DIR__.'/_init.php';
Medal::setDebug(true);
$ret = Medal::getUserMedals(10);
print_r($ret);
\ No newline at end of file
......@@ -8,9 +8,7 @@
use internalApi\ucenter\Member;
require __DIR__.'/../src/autoload.php';
\internalApi\base\Client::config(include __DIR__.'/../src/client_config_dev.php');
require __DIR__.'/_init.php';
$info = Member::getMemberInfo(12);
print_r($info);
\ No newline at end of file
......@@ -167,7 +167,6 @@ class Client
echo '<pre>';
echo '=====info====='."\r\n";
print_r($httpInfo);
echo $url;
echo "\r\n=====post data======\r\n";
var_dump($post);
......
......@@ -16,5 +16,10 @@ return [
'apiUrl' => 'http://u.yunya.com/test/api-server',
'clientId' => 'common',
'clientSecret' => 'Kuy2dVHKRWKAFRXX2l6k'
],
'code' => [
'apiUrl' => 'http://dev.wxherr.com/site/api-server',
'clientId' => 'common',
'clientSecret' => '1BO1WQwnpjc2GfjzrOuq'
]
];
\ No newline at end of file
<?php
namespace internalApi\code;
use internalApi\base\Client;
/**
* Created by PhpStorm.
* User: pader
* Date: 2017/6/28
* Time: 12:00
*/
class Medal extends Client
{
/**
* 获取扳手快查用户获得的勋章列表
*
* @param $uid
* @return array
*/
public static function getUserMedals($uid)
{
return self::call('medal.getUserMedals', compact('uid'));
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment