modified 添加redis配置

This commit is contained in:
zhaoxiang 2020-10-10 16:39:07 +08:00
parent 7dc9ef8b70
commit c9450bfa96

View File

@ -4,12 +4,17 @@ declare (strict_types=1);
namespace app\controller\api; namespace app\controller\api;
use app\util\StrRandom; use app\util\StrRandom;
use think\Exception;
use think\facade\App; use think\facade\App;
use think\Response; use think\Response;
class Miss extends Base { class Miss extends Base {
public function index(): Response { public function index(): Response {
$version = config('apiadmin.APP_VERSION');
if (!$version) {
throw new Exception('请先执行安装脚本,完成项目初始化!');
} else {
$this->debug([ $this->debug([
'TpVersion' => App::version(), 'TpVersion' => App::version(),
'Float' => StrRandom::randomPhone() 'Float' => StrRandom::randomPhone()
@ -17,9 +22,10 @@ class Miss extends Base {
return $this->buildSuccess([ return $this->buildSuccess([
'Product' => config('apiadmin.APP_NAME'), 'Product' => config('apiadmin.APP_NAME'),
'Version' => config('apiadmin.APP_VERSION'), 'Version' => $version,
'Company' => config('apiadmin.COMPANY_NAME'), 'Company' => config('apiadmin.COMPANY_NAME'),
'ToYou' => "I'm glad to meet you终于等到你" 'ToYou' => "I'm glad to meet you终于等到你"
]); ]);
} }
} }
}