TaoLer/app/index/controller/Jump.php
2020-01-17 18:52:53 +08:00

30 lines
543 B
PHP

<?php
namespace app\index\controller;
use app\common\controller\BaseController;
use think\facade\Request;
use think\facade\Session;
use think\facade\Cache;
use think\facade\Db;
class Jump extends BaseController
{
//用户中心
public function index()
{
$u = Request::param();
var_dump($u);
//查询用户
$user = Db::name('user')->whereOr('name',$u['name'])->whereOr('nickname',$u['name'])->find();
$id = $user['id'];
return redirect('/index/u/'.$id.'.html');
//halt($u);
//return view();
}
}