mirror of
https://github.com/aoaostar/toolbox.git
synced 2025-12-27 15:01:17 +00:00
使用naive ui重构后台面板
重构用户系统,方便支持更多OAuth认证方式
重构插件系统,方便静态资源的添加
BREAKING CHANGE: 🧨 更改管理员身份认证为用户id
27 lines
487 B
PHP
27 lines
487 B
PHP
<?php
|
|
|
|
namespace app\controller;
|
|
|
|
|
|
use think\facade\View;
|
|
|
|
class User extends Base
|
|
{
|
|
public function index()
|
|
{
|
|
$oauth_modes = get_enabled_oauth_mode();
|
|
|
|
$arr = [];
|
|
$user = get_user();
|
|
foreach ($oauth_modes as $v) {
|
|
if (!empty($user->oauth[$v])) {
|
|
$arr[$v] = $user->oauth[$v];
|
|
} else {
|
|
$arr[$v] = 0;
|
|
}
|
|
}
|
|
View::assign('oauth', $arr);
|
|
return view();
|
|
}
|
|
}
|