Commit 2743f579 authored by 夏彬's avatar 夏彬

修复缺陷

parent 17192060
#!/bin/sh
php ./src/restart.php --session=kw_wechat_robot
#!/bin/sh
php ./src/run.php --session=kw_wechat_robot
...@@ -47,6 +47,7 @@ class Swoole ...@@ -47,6 +47,7 @@ class Swoole
$server->on('receive', function (SwooleServer $server, $fd, $from_id, $data) { $server->on('receive', function (SwooleServer $server, $fd, $from_id, $data) {
$sourceData = $data;
$this->vbot->console->log(" receive data:" . $data); $this->vbot->console->log(" receive data:" . $data);
...@@ -54,13 +55,13 @@ class Swoole ...@@ -54,13 +55,13 @@ class Swoole
if (!$request[1]) { if (!$request[1]) {
$response = $this->vbot->api->handle($data); $response = $this->vbot->api->handle($sourceData);
} else { } else {
$data = json_decode($request[1], TRUE); $data = json_decode($request[1], TRUE);
if (!isset($data['action']) || !isset($data['params'])) { if (!isset($data['action']) || !isset($data['params'])) {
$response = $this->vbot->api->handle($data); $response = $this->vbot->api->handle($sourceData);
} else { } else {
if ($data['action'] === 'system') { if ($data['action'] === 'system') {
...@@ -79,7 +80,7 @@ class Swoole ...@@ -79,7 +80,7 @@ class Swoole
$response = "system params error not in shutdown or reload"; $response = "system params error not in shutdown or reload";
} }
} else { } else {
$response = $this->vbot->api->handle($data); $response = $this->vbot->api->handle($sourceData);
} }
} }
......
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