chat_add
This commit is contained in:
17
extend/chat/model/Base.php
Normal file
17
extend/chat/model/Base.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
namespace extend\chat\model;
|
||||
|
||||
use GatewayWorker\Lib\Gateway;
|
||||
use extend\chat\model\OnbocChat;
|
||||
use extend\chat\model\ShoppingChat;
|
||||
class Base
|
||||
{
|
||||
public function handles($client_id, $message)
|
||||
{
|
||||
if(empty($message['type']) || empty($message['operate_type']) || empty($message['user_id']) || empty($message['shop_id'])) {
|
||||
Gateway::sendToClient($client_id, json_encode(['msg' => '参数不完整']));
|
||||
return;
|
||||
}
|
||||
call_user_func_array(['extend\chat\model\\' . $message['type'], $message['operate_type']], [$client_id, $message]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user