|
@@ -17,7 +17,7 @@ class Core
|
|
|
if ($state == false) {
|
|
|
$result = Dever::daemon(self::url($send), 'main');
|
|
|
} else {
|
|
|
- $result = Dever::load('main/' . self::url($send));
|
|
|
+ $result = $this->call_api($send);
|
|
|
}
|
|
|
|
|
|
return $result;
|
|
@@ -30,9 +30,15 @@ class Core
|
|
|
return $url;
|
|
|
}
|
|
|
|
|
|
- public function call_api()
|
|
|
+ public function call_api($send = array())
|
|
|
{
|
|
|
- $send = json_decode(base64_decode(Dever::input('param')), true);
|
|
|
+ $state = false;
|
|
|
+ if ($send) {
|
|
|
+ $state = true;
|
|
|
+ } else {
|
|
|
+ $send = json_decode(base64_decode(Dever::input('param')), true);
|
|
|
+ }
|
|
|
+
|
|
|
if (isset($send['i']) && $send['i'] > 0) {
|
|
|
$wechat = new Wechat($send['i'], $send['a']);
|
|
|
$param = array();
|
|
@@ -47,8 +53,10 @@ class Core
|
|
|
if ($send['e']) {
|
|
|
Dever::load($send['a'] . '/' . $send['e'], $send['i'], $result, $send['p']);
|
|
|
}
|
|
|
- print_r($result);
|
|
|
- die;
|
|
|
+ if ($state == false) {
|
|
|
+ print_r($result);
|
|
|
+ die;
|
|
|
+ }
|
|
|
}
|
|
|
return;
|
|
|
}
|