index jump

This commit is contained in:
toogee 2020-01-17 18:52:53 +08:00
parent 76d0fb929d
commit 66c76281f7
4 changed files with 24 additions and 157 deletions

View File

@ -5,22 +5,25 @@ use app\common\controller\BaseController;
use think\facade\Request;
use think\facade\Session;
use think\facade\Cache;
use think\Db;
use think\facade\Db;
class User extends BaseController
class Jump extends BaseController
{
//用户中心
public function username()
public function index()
{
$user['user_id'] = session::get('user_id');
$username = session::get('user_name');
$u = Request::param('username');
$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();
//return view();
}

View File

@ -746,7 +746,7 @@ layui.define(['layer', 'laytpl', 'form', 'element', 'upload', 'util'], function(
}
text = text.replace(/^@|[\s\S]+?/g, '');
othis.attr({
href: '/index/jump?username='+ text
href: '/index/jump/index?name='+ text
,target: '_blank'
});
});

View File

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="keywords" content="fly,layui,前端社区">
<meta name="description" content="Fly社区是模块化前端UI框架Layui的官网社区致力于为web开发提供强劲动力">
<link rel="stylesheet" href="/static/res/layui/css/layui.css">
<link rel="stylesheet" href="/static/layui/css/layui.css">
<link rel="stylesheet" href="/static/res/css/global.css" charset="utf-8">
</head>
<body>
@ -16,14 +16,14 @@
<div class="fly-panel">
<div class="fly-none">
<h2><i class="iconfont icon-404"></i></h2>
<p>页面或者数据被<a href="http://fly.layui.com/u/336" target="_blank"> 纸飞机 </a>运到火星了,啥都看不到了…</p>
<p>页面或者数据被<a href="/" target="_blank"> 纸飞机 </a>运到火星了,啥都看不到了…</p>
</div>
</div>
</div>
<include file="./footer" />
<script src="/static/res/mods/jquery.min.js" charset="utf-8"></script>
<script src="/static/res/layui/layui.js" charset="utf-8"></script>
<script src="/static/layui/jquery.min.js" charset="utf-8"></script>
<script src="/static/layui/layui.js" charset="utf-8"></script>
<script>
layui.cache.user = {

View File

@ -2,30 +2,30 @@
<html>
<head>
<meta charset="utf-8">
<title>{block name="title"}这是title{/block}</title>
<title>404 - TaoLer社区</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="keywords" content="fly,layui,前端社区">
<meta name="description" content="Fly社区是模块化前端UI框架Layui的官网社区致力于为web开发提供强劲动力">
<link rel="stylesheet" href="/static/res/layui/css/layui.css">
<link rel="stylesheet" href="/static/layui/css/layui.css">
<link rel="stylesheet" href="/static/res/css/global.css" charset="utf-8">
</head>
<body>
<include file="public/header" />
<include file="public/column" />
<body>
<include file="./index/public/header.html" />
<include file="./index/public/column" />
<div class="layui-container fly-marginTop">
<div class="fly-panel">
<div class="fly-none">
<h2><i class="iconfont icon-404"></i></h2>
<p>页面或者数据被<a href="http://fly.layui.com/u/336" target="_blank"> 纸飞机 </a>运到火星了,啥都看不到了…</p>
<p>页面或者数据被<a href="/" target="_blank"> 纸飞机 </a>运到火星了,啥都看不到了…</p>
</div>
</div>
</div>
<include file="public/footer" />
<include file="public/js" />
<include file="./footer" />
<script src="/static/layui/jquery.min.js" charset="utf-8"></script>
<script src="/static/layui/layui.js" charset="utf-8"></script>
<script>
layui.cache.page = 'index';
layui.cache.user = {
username: '{$user.name??'游客'}'
,uid: {$user.id ? 168*$user.id : -1}
@ -55,139 +55,3 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>404 - Fly社区</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="keywords" content="fly,layui,前端社区">
<meta name="description" content="Fly社区是模块化前端UI框架Layui的官网社区致力于为web开发提供强劲动力">
<link rel="stylesheet" href="/res/layui/css/layui.css">
<link rel="stylesheet" href="/res/css/global.css">
</head>
<body>
<div class="fly-header layui-bg-black">
<div class="layui-container">
<a class="fly-logo" href="/">
<img src="../../res/images/logo.png" alt="layui">
</a>
<ul class="layui-nav fly-nav layui-hide-xs">
<li class="layui-nav-item layui-this">
<a href="/"><i class="iconfont icon-jiaoliu"></i>交流</a>
</li>
<li class="layui-nav-item">
<a href="../case/case.html"><i class="iconfont icon-iconmingxinganli"></i>案例</a>
</li>
<li class="layui-nav-item">
<a href="http://www.layui.com/" target="_blank"><i class="iconfont icon-ui"></i>框架</a>
</li>
</ul>
<ul class="layui-nav fly-nav-user">
<!-- 未登入的状态 -->
<li class="layui-nav-item">
<a class="iconfont icon-touxiang layui-hide-xs" href="../user/login.html"></a>
</li>
<li class="layui-nav-item">
<a href="../user/login.html">登入</a>
</li>
<li class="layui-nav-item">
<a href="../user/reg.html">注册</a>
</li>
<li class="layui-nav-item layui-hide-xs">
<a href="" onclick="layer.msg('正在通过QQ登入', {icon:16, shade: 0.1, time:0})" title="QQ登入" class="iconfont icon-qq"></a>
</li>
<li class="layui-nav-item layui-hide-xs">
<a href="" onclick="layer.msg('正在通过微博登入', {icon:16, shade: 0.1, time:0})" title="微博登入" class="iconfont icon-weibo"></a>
</li>
<!-- 登入后的状态 -->
<!--
<li class="layui-nav-item">
<a class="fly-nav-avatar" href="javascript:;">
<cite class="layui-hide-xs">贤心</cite>
<i class="iconfont icon-renzheng layui-hide-xs" title="认证信息layui 作者"></i>
<i class="layui-badge fly-badge-vip layui-hide-xs">VIP3</i>
<img src="https://tva1.sinaimg.cn/crop.0.0.118.118.180/5db11ff4gw1e77d3nqrv8j203b03cweg.jpg">
</a>
<dl class="layui-nav-child">
<dd><a href="user/set.html"><i class="layui-icon">&#xe620;</i>基本设置</a></dd>
<dd><a href="user/message.html"><i class="iconfont icon-tongzhi" style="top: 4px;"></i>我的消息</a></dd>
<dd><a href="user/home.html"><i class="layui-icon" style="margin-left: 2px; font-size: 22px;">&#xe68e;</i>我的主页</a></dd>
<hr style="margin: 5px 0;">
<dd><a href="/user/logout/" style="text-align: center;">退出</a></dd>
</dl>
</li>
-->
</ul>
</div>
</div>
<div class="fly-panel fly-column">
<div class="layui-container">
<ul class="layui-clear">
<li class="layui-hide-xs layui-this"><a href="/">首页</a></li>
<li><a href="../jie/index.html">提问</a></li>
<li><a href="../jie/index.html">分享<span class="layui-badge-dot"></span></a></li>
<li><a href="../jie/index.html">讨论</a></li>
<li><a href="../jie/index.html">建议</a></li>
<li><a href="../jie/index.html">公告</a></li>
<li><a href="../jie/index.html">动态</a></li>
<li class="layui-hide-xs layui-hide-sm layui-show-md-inline-block"><span class="fly-mid"></span></li>
<!-- 用户登入后显示 -->
<li class="layui-hide-xs layui-hide-sm layui-show-md-inline-block"><a href="user/index.html">我发表的贴</a></li>
<li class="layui-hide-xs layui-hide-sm layui-show-md-inline-block"><a href="user/index.html#collection">我收藏的贴</a></li>
</ul>
<div class="fly-column-right layui-hide-xs">
<span class="fly-search"><i class="layui-icon"></i></span>
<a href="jie/add.html" class="layui-btn">发表新帖</a>
</div>
<div class="layui-hide-sm layui-show-xs-block" style="margin-top: -10px; padding-bottom: 10px; text-align: center;">
<a href="jie/add.html" class="layui-btn">发表新帖</a>
</div>
</div>
</div>
<div class="layui-container fly-marginTop">
<div class="fly-panel">
<div class="fly-none">
<h2><i class="iconfont icon-404"></i></h2>
<p>页面或者数据被<a href="http://fly.layui.com/u/336" target="_blank"> 纸飞机 </a>运到火星了,啥都看不到了…</p>
</div>
</div>
</div>
<div class="fly-footer">
<p><a href="http://fly.layui.com/" target="_blank">Fly社区</a> 2017 &copy; <a href="http://www.layui.com/" target="_blank">layui.com 出品</a></p>
<p>
<a href="http://fly.layui.com/jie/3147/" target="_blank">付费计划</a>
<a href="http://www.layui.com/template/fly/" target="_blank">获取Fly社区模版</a>
<a href="http://fly.layui.com/jie/2461/" target="_blank">微信公众号</a>
</p>
</div>
<script src="/res/layui/layui.js"></script>
<script>
layui.cache.page = '';
layui.cache.user = {
username: '游客'
,uid: -1
,avatar: '../../res/images/avatar/00.jpg'
,experience: 123
,sex: '男'
};
layui.config({
version: "3.0.0"
,base: '../../res/mods/'
}).extend({
fly: 'index'
}).use('fly');
</script>
</body>
</html>