TaoLer/app/index/controller/Jump.php

26 lines
499 B
PHP
Raw Permalink Normal View History

2020-01-01 13:17:19 +08:00
<?php
namespace app\index\controller;
use app\common\controller\BaseController;
use think\facade\Request;
use think\facade\Session;
use think\facade\Cache;
2020-01-17 18:52:53 +08:00
use think\facade\Db;
2020-01-01 13:17:19 +08:00
2020-01-17 18:52:53 +08:00
class Jump extends BaseController
2020-01-01 13:17:19 +08:00
{
//用户中心
2020-01-17 18:52:53 +08:00
public function index()
2020-01-01 13:17:19 +08:00
{
2020-01-17 18:52:53 +08:00
$u = Request::param();
//查询用户
$user = Db::name('user')->whereOr('name',$u['name'])->whereOr('nickname',$u['name'])->find();
$id = $user['id'];
2020-04-30 18:35:46 +08:00
return redirect((string) url('user/home',['id'=>$id]));
2020-01-01 13:17:19 +08:00
}
}