Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kw_wechat_robot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
kw_wechat_robot
Commits
2743f579
Commit
2743f579
authored
Jul 17, 2018
by
夏彬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复缺陷
parent
17192060
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
3 deletions
+8
-3
restart.sh
restart.sh
+2
-0
run.sh
run.sh
+2
-0
Swoole.php
vendor/hanson/vbot/src/Core/Swoole.php
+4
-3
No files found.
restart.sh
0 → 100644
View file @
2743f579
#!/bin/sh
php ./src/restart.php
--session
=
kw_wechat_robot
run.sh
0 → 100644
View file @
2743f579
#!/bin/sh
php ./src/run.php
--session
=
kw_wechat_robot
vendor/hanson/vbot/src/Core/Swoole.php
View file @
2743f579
...
...
@@ -47,6 +47,7 @@ class Swoole
$server
->
on
(
'receive'
,
function
(
SwooleServer
$server
,
$fd
,
$from_id
,
$data
)
{
$sourceData
=
$data
;
$this
->
vbot
->
console
->
log
(
" receive data:"
.
$data
);
...
...
@@ -54,13 +55,13 @@ class Swoole
if
(
!
$request
[
1
])
{
$response
=
$this
->
vbot
->
api
->
handle
(
$
d
ata
);
$response
=
$this
->
vbot
->
api
->
handle
(
$
sourceD
ata
);
}
else
{
$data
=
json_decode
(
$request
[
1
],
TRUE
);
if
(
!
isset
(
$data
[
'action'
])
||
!
isset
(
$data
[
'params'
]))
{
$response
=
$this
->
vbot
->
api
->
handle
(
$
d
ata
);
$response
=
$this
->
vbot
->
api
->
handle
(
$
sourceD
ata
);
}
else
{
if
(
$data
[
'action'
]
===
'system'
)
{
...
...
@@ -79,7 +80,7 @@ class Swoole
$response
=
"system params error not in shutdown or reload"
;
}
}
else
{
$response
=
$this
->
vbot
->
api
->
handle
(
$
d
ata
);
$response
=
$this
->
vbot
->
api
->
handle
(
$
sourceD
ata
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment