2022-12-17 20:38:00 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace app\controller;
|
|
|
|
use support\Request;
|
2022-12-24 22:10:40 +08:00
|
|
|
use support\Redis;
|
|
|
|
use support\View;
|
2022-12-17 20:38:00 +08:00
|
|
|
|
|
|
|
class IndexController
|
|
|
|
{
|
|
|
|
public function index(Request $request)
|
|
|
|
{
|
2022-12-24 22:10:40 +08:00
|
|
|
View::assign('userinfo', $request->session()->get('userinfo'));
|
|
|
|
return view('index');
|
2022-12-17 20:38:00 +08:00
|
|
|
}
|
|
|
|
|
2022-12-24 22:10:40 +08:00
|
|
|
public function user(Request $request)
|
2022-12-17 20:38:00 +08:00
|
|
|
{
|
2022-12-24 22:10:40 +08:00
|
|
|
$redis = Redis::connection('default');
|
|
|
|
$user=$redis->hgetall('User');
|
|
|
|
View::assign('user', $user);
|
|
|
|
View::assign('userinfo', $request->session()->get('userinfo'));
|
|
|
|
return view('user');
|
2022-12-17 20:38:00 +08:00
|
|
|
}
|
2024-01-31 22:15:08 +08:00
|
|
|
public function domain(Request $request)
|
|
|
|
{
|
|
|
|
View::assign('userinfo', $request->session()->get('userinfo'));
|
2024-02-05 00:00:23 +08:00
|
|
|
return view('domain');
|
2024-01-31 22:15:08 +08:00
|
|
|
}
|
2022-12-17 20:38:00 +08:00
|
|
|
public function json(Request $request)
|
|
|
|
{
|
|
|
|
return json(['code' => 0, 'msg' => 'ok']);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|