From c3a814ee6f8b4bcba41aeb5e2a6e496d2ccf1fa8 Mon Sep 17 00:00:00 2001 From: toogee Date: Thu, 30 Apr 2020 18:35:46 +0800 Subject: [PATCH] user message --- README.md | 8 ++++---- app/index/controller/Article.php | 3 ++- app/index/controller/Index.php | 2 +- app/index/controller/Jump.php | 2 +- app/install/data/taoler.sql | 2 +- public/static/res/mods/user.js | 2 +- view/admin/set/user/info.html | 4 ++-- view/index/user/message.html | 3 ++- 8 files changed, 14 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 4350c1c..032a102 100644 --- a/README.md +++ b/README.md @@ -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。 diff --git a/app/index/controller/Article.php b/app/index/controller/Article.php index ab1aea0..12b4f3b 100644 --- a/app/index/controller/Article.php +++ b/app/index/controller/Article.php @@ -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); diff --git a/app/index/controller/Index.php b/app/index/controller/Index.php index 66d735c..46e0c30 100644 --- a/app/index/controller/Index.php +++ b/app/index/controller/Index.php @@ -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']])); } diff --git a/app/index/controller/Jump.php b/app/index/controller/Jump.php index 43bec75..1effcc9 100644 --- a/app/index/controller/Jump.php +++ b/app/index/controller/Jump.php @@ -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])); } diff --git a/app/install/data/taoler.sql b/app/install/data/taoler.sql index 7c6edbe..485f69d 100644 --- a/app/install/data/taoler.sql +++ b/app/install/data/taoler.sql @@ -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', diff --git a/public/static/res/mods/user.js b/public/static/res/mods/user.js index dda315a..36b4670 100644 --- a/public/static/res/mods/user.js +++ b/public/static/res/mods/user.js @@ -307,7 +307,7 @@ layui.define(['laypage', 'fly', 'element', 'flow'], function(exports){ {{# for(var i = 0; i < len; i++){ }}\
  • \ {{# if(d.rows[i].type == 1){ }}\ -
    {{ d.rows[i].name}}回答了您的帖子{{ d.rows[i].title}} {{ d.rows[i].read}}
    \ +
    {{ d.rows[i].name}}回答了您的帖子{{ d.rows[i].title}} {{ d.rows[i].read}}
    \ {{# } else { }}\
    系统消息:{{ d.rows[i].title}} {{ d.rows[i].read}}
    \ {{# } }}\ diff --git a/view/admin/set/user/info.html b/view/admin/set/user/info.html index 2dea215..6173547 100644 --- a/view/admin/set/user/info.html +++ b/view/admin/set/user/info.html @@ -36,8 +36,8 @@
    - - + +