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

49 lines
997 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/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]);
});
}
}