From f49a8f2394abca2f8d57c2dd2bbe4e50b6148cec Mon Sep 17 00:00:00 2001 From: toogee Date: Sat, 28 Mar 2020 21:48:35 +0800 Subject: [PATCH] message send --- config/app.php | 10 +++++-- public/static/res/mods/index.js | 4 +-- public/static/res/mods/user.js | 20 +++++++------- view/index/article/detail.html | 6 ++--- view/index/public/header.html | 4 +-- view/index/public/user-nav.html | 4 +-- view/index/user/message.html | 47 +++++++++++++++++++++++++-------- 7 files changed, 64 insertions(+), 31 deletions(-) diff --git a/config/app.php b/config/app.php index 356f4d7..27ebafd 100644 --- a/config/app.php +++ b/config/app.php @@ -20,15 +20,21 @@ return [ // 应用映射(自动多应用模式有效) 'app_map' => [], // 域名绑定(自动多应用模式有效) - 'domain_bind' => [], + 'domain_bind' => [ + //'www' => 'index' + ], // 禁止URL访问的应用列表(自动多应用模式有效) 'deny_app_list' => [], // 异常页面的模板文件 - 'exception_tmpl' => '../view/404.html', + 'exception_tmpl' => app()->getThinkPath() . 'tpl/think_exception.tpl', // 错误显示信息,非调试模式有效 'error_message' => '页面错误!请稍后再试~', // 显示错误信息 'show_error_msg' => false, + //404 + 'http_exception_template' => [ + 404 => \think\facade\App::getAppPath() .'view/404.html' + ] ]; diff --git a/public/static/res/mods/index.js b/public/static/res/mods/index.js index d4a0e90..39199e2 100644 --- a/public/static/res/mods/index.js +++ b/public/static/res/mods/index.js @@ -402,9 +402,9 @@ layui.define(['layer', 'laytpl', 'form', 'element', 'upload', 'util'], function( var msg = $(''+ res.count +''); elemUser.append(msg); msg.on('click', function(){ - fly.json('/message/read', {}, function(res){ + fly.json('/index/message/read', {}, function(res){ if(res.status === 0){ - location.href = '/user/message'; + location.href = '/index/user/message'; } }); }); diff --git a/public/static/res/mods/user.js b/public/static/res/mods/user.js index ba71236..e6a2776 100644 --- a/public/static/res/mods/user.js +++ b/public/static/res/mods/user.js @@ -26,10 +26,11 @@ layui.define(['laypage', 'fly', 'element', 'flow'], function(exports){ -/* + //我的相关数据 var elemUC = $('#LAY_uc'), elemUCM = $('#LAY_ucm'); gather.minelog = {}; +/* gather.mine = function(index, type, url){ var tpl = [ //求解 @@ -136,14 +137,14 @@ layui.define(['laypage', 'fly', 'element', 'flow'], function(exports){ page(); } }; - +*/ if(elemUC[0]){ layui.each(dom.mine.children(), function(index, item){ var othis = $(item) gather.mine(index, othis.data('type'), othis.data('url')); }); } -*/ + //显示当前tab if(location.hash){ element.tabChange('user', location.hash.replace(/^#/, '')); @@ -307,7 +308,7 @@ layui.define(['laypage', 'fly', 'element', 'flow'], function(exports){ @@ -34,7 +34,7 @@
用户中心
基本设置

- +
我的消息
我的主页

退出
diff --git a/view/index/public/user-nav.html b/view/index/public/user-nav.html index 06f07db..c530dcc 100644 --- a/view/index/public/user-nav.html +++ b/view/index/public/user-nav.html @@ -17,12 +17,12 @@ 我的帖子 - +
  • diff --git a/view/index/user/message.html b/view/index/user/message.html index 158df66..442005b 100644 --- a/view/index/user/message.html +++ b/view/index/user/message.html @@ -3,15 +3,17 @@ {block name="content"}
    -
    - +
    + +
    {/block} {block name="script"} {/block}