更新显示架构
This commit is contained in:
@@ -8,17 +8,45 @@ use app\model\Banner;
|
||||
use app\index\BaseController;
|
||||
use app\model\FrontMenu;
|
||||
use app\model\OnePage;
|
||||
use app\model\System\SystemSiteSettings;
|
||||
use app\service\ThemeService;
|
||||
use think\db\exception\DbException;
|
||||
use think\facade\Env;
|
||||
use app\model\System\SystemSiteSettings;
|
||||
|
||||
class Index extends BaseController
|
||||
{
|
||||
private ThemeService $themeService;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->themeService = new ThemeService();
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
return view('index/index');
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端初始化接口 - 返回当前模板和填充数据
|
||||
* @return \think\response\Json
|
||||
*/
|
||||
public function init()
|
||||
{
|
||||
// 直接返回默认模板数据
|
||||
return json([
|
||||
'code' => 200,
|
||||
'msg' => 'success',
|
||||
'data' => [
|
||||
'theme_key' => 'default',
|
||||
'theme_path' => '/themes/default/index.html',
|
||||
'data' => [
|
||||
'site_name' => '企业官网'
|
||||
]
|
||||
]
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取日志列表
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user