chore: 重写初始提交(清空历史,整理后全量提交)
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | YwxApp [ WE CAN DO IT JUST THINK ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2026-2036 http://ywxapp.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: ywxapp<admin@ywxapp.cn>
|
||||
// +----------------------------------------------------------------------
|
||||
declare (strict_types = 1);
|
||||
|
||||
namespace addon\blog\controller\backend;
|
||||
|
||||
use think\facade\View;
|
||||
use ywxapp\controller\BackendBase;
|
||||
|
||||
/**
|
||||
* 插件后台入口页(addon/blog/controller/admin/Index.php)
|
||||
*
|
||||
* 继承 AddonBackend,并处于 route/app.php 的 admin 路由组中,
|
||||
* 该组已挂 \addon\blog\middleware\AdminAuth 中间件,自动将 auth 绑定为管理员并强制登录。
|
||||
*/
|
||||
class Index extends BackendBase
|
||||
{
|
||||
|
||||
protected $noNeedVerify = ['*'];
|
||||
|
||||
|
||||
protected function initialize()
|
||||
{}
|
||||
|
||||
/**
|
||||
* 后台首页
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$admin = $this->auth->info ?? null;
|
||||
// 同时赋值 user,供 layout.html 头部的 {$user.nickname} 使用
|
||||
$this->view->assign('member', $admin);
|
||||
|
||||
return View::fetch('index/index', [
|
||||
'backend' => $admin,
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user