Files
fast_response/front/application/api/controller/BaseWssApi.php
Your Name dce091da91 t
2025-03-27 07:52:44 +00:00

34 lines
675 B
PHP
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
/*
* description
* authorwh
* email
* createTime{2024/4/5} {19:55}
*/
namespace app\api\controller;
class BaseWssApi extends BaseCommonController
{
/**
* descsocket专用json格式
*
* authorwh
* @param $action
* @param string $msg
* @param array $items
* @param string $method
* @return false|string
*/
static function json_wss($action,$msg='', $items=[], $method='response'){
$json = [
'action'=>$action,
'method'=>$method,
'msg'=>$msg,
'items'=>$items
];
return json_encode($json, JSON_UNESCAPED_UNICODE);
}
}