no message
This commit is contained in:
parent
57733922b9
commit
c8a19e5f7b
@ -35,7 +35,7 @@ $oHttp->aData = [
|
|||||||
'type' => 'private'
|
'type' => 'private'
|
||||||
],
|
],
|
||||||
'date' => 1610000000,
|
'date' => 1610000000,
|
||||||
"text" => "\/nodeLike#name 日本 JP-",
|
"text" => "\/nodeLike#name#type1 m1",
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@ -730,12 +730,12 @@ final class HookController
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 节点搜索
|
// 节点搜索
|
||||||
// /nodeLike_duck jp02
|
// /nodeLike_duck_type1 jp02
|
||||||
if (strpos($sText, '/nodeLike') === 0 || strpos($sText, '\/nodeLike') === 0) {
|
if (strpos($sText, '/nodeLike') === 0 || strpos($sText, '\/nodeLike') === 0) {
|
||||||
|
|
||||||
list($sCmd, $sLike) = explode(" ", $sText, 2);
|
@list($sCmd, $sLike) = explode(" ", $sText);
|
||||||
|
|
||||||
list(, $sField) = explode("#", $sCmd, 2);
|
@list(, $sField, $sMod) = explode("#", $sCmd, 3);
|
||||||
|
|
||||||
switch ($sField) {
|
switch ($sField) {
|
||||||
case "port":
|
case "port":
|
||||||
@ -759,7 +759,13 @@ final class HookController
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
$aNodeList = Node::where($sField, 'like', '%' . $sLike . '%')->orderBy('type', 'desc')->orderBy('name', 'asc')->get()->toArray();
|
$oNodeList = Node::where($sField, 'like', '%' . $sLike . '%');
|
||||||
|
|
||||||
|
if ($sMod == 'type1') {
|
||||||
|
$oNodeList->where('type', 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
$aNodeList = $oNodeList->orderBy('type', 'desc')->orderBy('name', 'asc')->get()->toArray();
|
||||||
|
|
||||||
} catch (\Illuminate\Database\QueryException $e) {
|
} catch (\Illuminate\Database\QueryException $e) {
|
||||||
|
|
||||||
@ -796,7 +802,7 @@ final class HookController
|
|||||||
}
|
}
|
||||||
|
|
||||||
// $sMsg = json_encode($aNodeListNew, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT);
|
// $sMsg = json_encode($aNodeListNew, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT);
|
||||||
Http::response(200, 'ok');
|
// Http::response(200, 'ok');
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->sendMessage($sMsg);
|
$this->sendMessage($sMsg);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user