更新细节
This commit is contained in:
parent
0bb4521c19
commit
6264b24a9c
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
|
||||
namespace app\index\controller;
|
||||
|
||||
use app\BaseController;
|
||||
use app\common\service\JsonService;
|
||||
use think\facade\Request;
|
||||
|
||||
class IndexController extends BaseController
|
||||
{
|
||||
|
||||
/**
|
||||
* @notes 主页
|
||||
* @param string $name
|
||||
* @return \think\response\Json|\think\response\View
|
||||
* @author 段誉
|
||||
* @date 2022/10/27 18:12
|
||||
*/
|
||||
public function index($name = 'hello, man!')
|
||||
{
|
||||
$template = app()->getRootPath() . 'public/admin/index.html';
|
||||
if (file_exists($template)) {
|
||||
return view($template);
|
||||
}
|
||||
return JsonService::success($name);
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue