user message

This commit is contained in:
toogee 2020-04-30 18:35:46 +08:00
parent 95c8d61c0a
commit c3a814ee6f
8 changed files with 14 additions and 12 deletions

View File

@ -2,8 +2,8 @@
版本TaoLer 1.0.0
日期2020.1.1
官网http://www.aieok.com
测试http://www.aieok.com/admin 账号test 密码test123
官网https://www.aieok.com
测试https://adm.aieok.com 账号test 密码test123
#### 项目地址
@ -34,7 +34,7 @@
#### 安装教程
1. git下载https://gitee.com/toogee/TaoLer
2. 官网下载http://www.aieok.com
2. 官网下载https://www.aieok.com
3. 解压后项目绑定域名为public目录对外访问首次安装访问域名http://www.youdomain.com可自动跳转到/install/index进行引导安装重新安装需删除根目录下install.lock。
4. 安装前需要先创建mysql数据库(准备:数据库连接地址,数据库用户名,数据库密码,数据库端口,建好在数据库名)
5. 请牢记安装设置的管理员用户名和密码默认admin/123456。前后台的管理员密码一致。前后端管理员账户是独立的前端主要对文章内容的审查管理等操作。
@ -63,6 +63,6 @@
本项目包含的第三方源码和二进制文件之版权信息另行标注。
版权所有Copyright © 2020 by aieok.com (http://www.aieok.com)
版权所有Copyright © 2020 by aieok.com (https://www.aieok.com)
All rights reserved。

View File

@ -203,7 +203,8 @@ class Article extends BaseController
//站内信
$article = Db::name('article')->field('id,title,user_id')->where('id',$data['article_id'])->find();
$title = $article['title'];
$link = '/jie/'.$data['article_id'].'.html';
$link = (string) url('article/detail',['id'=>$data['article_id']]);
//@user comment
$preg = "/@([^@\s]*)\s/";
preg_match($preg,$data['content'],$username);

View File

@ -155,7 +155,7 @@ class Index extends BaseController
{
$username = Request::param('username');
$u = Db::name('user')->whereOr('nickname', $username)->whereOr('name', $username)->find();
return redirect('index/user/home',['id'=>$u['id']]);
return redirect((string) url('user/home',['id'=>$u['id']]));
}

View File

@ -19,7 +19,7 @@ class Jump extends BaseController
//查询用户
$user = Db::name('user')->whereOr('name',$u['name'])->whereOr('nickname',$u['name'])->find();
$id = $user['id'];
return redirect('/index/u/'.$id.'.html');
return redirect((string) url('user/home',['id'=>$id]));
}

View File

@ -345,7 +345,7 @@ CREATE TABLE `tao_user` (
`sign` varchar(255) NOT NULL DEFAULT '' COMMENT '签名',
`user_img` varbinary(70) NOT NULL DEFAULT '' COMMENT '头像',
`auth` enum('1','0') NOT NULL DEFAULT '0' COMMENT '管理员权限0普通1超级',
`point` tinyint(11) NOT NULL DEFAULT '0' COMMENT '积分',
`point` int(11) NOT NULL DEFAULT '0' COMMENT '积分',
`area_id` int(11) DEFAULT NULL COMMENT '用户所属区域ID',
`status` enum('0','1') NOT NULL DEFAULT '1' COMMENT '1启用0禁用',
`vip` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'vip',

View File

@ -307,7 +307,7 @@ layui.define(['laypage', 'fly', 'element', 'flow'], function(exports){
{{# for(var i = 0; i < len; i++){ }}\
<li data-id="{{d.rows[i].id}}">\
{{# if(d.rows[i].type == 1){ }}\
<blockquote class="layui-elem-quote"><a href="/index/jump?name={{ d.rows[i].name}}" target="_blank"><cite>{{ d.rows[i].name}}</cite></a><a target="_blank" class="art-title" id-data="{{ d.rows[i].id}}" href="{{ d.rows[i].link}}"><cite>{{ d.rows[i].title}}</cite></a> <span class="float:right">{{ d.rows[i].read}}</span></blockquote>\
<blockquote class="layui-elem-quote"><a href= "'+ userNameJump +'?username={{ d.rows[i].name}}" target="_blank"><cite>{{ d.rows[i].name}}</cite></a><a target="_blank" class="art-title" id-data="{{ d.rows[i].id}}" href="{{ d.rows[i].link}}"><cite>{{ d.rows[i].title}}</cite></a> <span class="float:right">{{ d.rows[i].read}}</span></blockquote>\
{{# } else { }}\
<blockquote class="layui-elem-quote">系统消息<a class="sys-title" id-data="{{ d.rows[i].id}}" href="javascript:;"><cite>{{ d.rows[i].title}}</cite></a> <span class="float:right">{{ d.rows[i].read}}</span></blockquote>\
{{# } }}\

View File

@ -36,8 +36,8 @@
<div class="layui-form-item">
<label class="layui-form-label">性别</label>
<div class="layui-input-block">
<input type="radio" name="sex" value="0" {if condition="$admin['sex'] eq 1"} checked {/if} title="男">
<input type="radio" name="sex" value="1" {if condition="$admin['sex'] eq 0"} checked {/if} title="女">
<input type="radio" name="sex" value="0" {if condition="$admin['sex'] eq 0"} checked {/if} title="男">
<input type="radio" name="sex" value="1" {if condition="$admin['sex'] eq 1"} checked {/if} title="女">
</div>
</div>
<!--div class="layui-form-item">

View File

@ -23,7 +23,8 @@
fly: 'index'
}).use('fly');
var messageFind = "{:url('index/Message/find')}",
messageRemove = "{:url('index/Message/remove')}";
messageRemove = "{:url('index/Message/remove')}",
userNameJump = "{:url('index/Index/jump')}";
//点开标题改变帖子已读状态
$('#LAY_minemsg').on('click','.art-title', function(){