modified 添加redis配置

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

View File

@ -4,22 +4,28 @@ 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 {
$this->debug([ $version = config('apiadmin.APP_VERSION');
'TpVersion' => App::version(), if (!$version) {
'Float' => StrRandom::randomPhone() throw new Exception('请先执行安装脚本,完成项目初始化!');
]); } else {
$this->debug([
'TpVersion' => App::version(),
'Float' => StrRandom::randomPhone()
]);
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终于等到你"
]); ]);
}
} }
} }