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