This commit is contained in:
2025-03-17 11:27:07 +08:00
parent 7a7f432006
commit 5febeca83f
6805 changed files with 6 additions and 6 deletions

View File

@@ -0,0 +1,49 @@
<?php
/*
* description
* authorwh
* 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
*
* authorwh
*/
function getUniqueId(){
return Mmodel::catchJson(function (){
$uniqueid = md5(Tools::getMillisecond());
return Tools::set_ok('ok',['uniqueid'=>$uniqueid]);
});
}
/**
* desc获取对话token在听译对话开始之前调用用于隔离聊天记录
* 参数:无
*
* api/Common/getSayToken
*
* authorwh
*/
function getSayToken(){
return Mmodel::catchJson(function (){
$uniqueid = md5(Tools::getMillisecond());
return Tools::set_ok('ok',['uniqueid'=>$uniqueid]);
});
}
}