fixed
This commit is contained in:
49
front/application/api/controller/Common.php
Normal file
49
front/application/api/controller/Common.php
Normal file
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
/*
|
||||
* description:
|
||||
* author:wh
|
||||
* email:
|
||||
* createTime:{2024/8/13} {17:27}
|
||||
*/
|
||||
|
||||
namespace app\api\controller;
|
||||
|
||||
|
||||
use wanghua\general_utility_tools_php\Mmodel;
|
||||
use wanghua\general_utility_tools_php\tool\Tools;
|
||||
|
||||
class Common extends BaseHttpApi
|
||||
{
|
||||
|
||||
/**
|
||||
* desc:唯一id
|
||||
* 参数:无
|
||||
*
|
||||
* api/Common/getUniqueId
|
||||
*
|
||||
* author:wh
|
||||
*/
|
||||
function getUniqueId(){
|
||||
return Mmodel::catchJson(function (){
|
||||
$uniqueid = md5(Tools::getMillisecond());
|
||||
return Tools::set_ok('ok',['uniqueid'=>$uniqueid]);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* desc:获取对话token,在听译对话开始之前调用,用于隔离聊天记录
|
||||
* 参数:无
|
||||
*
|
||||
* api/Common/getSayToken
|
||||
*
|
||||
* author:wh
|
||||
*/
|
||||
function getSayToken(){
|
||||
return Mmodel::catchJson(function (){
|
||||
$uniqueid = md5(Tools::getMillisecond());
|
||||
return Tools::set_ok('ok',['uniqueid'=>$uniqueid]);
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user