From 9a5fa14fe5ab83fb1aa16137caed393e3c304370 Mon Sep 17 00:00:00 2001 From: doramart Date: Thu, 17 Sep 2015 11:35:02 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=96=B0=E6=95=B4=E7=90=86=E5=88=86?= =?UTF-8?q?=E9=A1=B5=E5=B9=B6=E4=BF=AE=E5=A4=8DangularJs=E4=BA=A7=E7=94=9F?= =?UTF-8?q?=E7=9A=84=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models/db/settings.js | 2 +- models/db/siteFunc.js | 13 ++++-- views/web/public/confirmEmail.ejs | 3 +- views/web/public/defaultTemp.ejs | 4 +- views/web/public/header.ejs | 3 -- views/web/public/login.ejs | 1 + views/web/public/msgBoard.ejs | 32 +++++-------- views/web/public/pagination.ejs | 69 ++++++++++++++++------------ views/web/public/reSetPsd.ejs | 1 + views/web/public/reg.ejs | 3 +- views/web/public/setPsd.ejs | 1 + views/web/public/uInfo.ejs | 1 + views/web/users/userCenter.ejs | 3 +- views/web/users/userConfirmEmail.ejs | 4 +- views/web/users/userLogin.ejs | 4 +- views/web/users/userNotice.ejs | 4 +- views/web/users/userReg.ejs | 4 +- views/web/users/userResetPsd.ejs | 3 +- views/web/users/userSetPsd.ejs | 4 +- 19 files changed, 86 insertions(+), 73 deletions(-) diff --git a/models/db/settings.js b/models/db/settings.js index 129a041..7e1b773 100644 --- a/models/db/settings.js +++ b/models/db/settings.js @@ -65,7 +65,7 @@ module.exports = { site_email : 'xx@163.com', site_email_psd : 'xxx', email_findPsd : 'findPsd', - email_reg_active : 'reg_active' + email_reg_active : 'reg_active', email_notice_contentMsg : 'notice_contentMsg', email_notice_user_contentMsg : 'notice_user_contentMsg' }; diff --git a/models/db/siteFunc.js b/models/db/siteFunc.js index c5a0928..fe36b3d 100644 --- a/models/db/siteFunc.js +++ b/models/db/siteFunc.js @@ -9,6 +9,8 @@ var ContentCategory = require("../ContentCategory"); var ContentTags = require("../ContentTags"); //广告对象 var Ads = require("../Ads"); +//留言对象 +var Message = require("../Message"); var settings = require("./settings"); //数据库操作对象 var DbOpt = require("../Dbopt"); @@ -88,6 +90,10 @@ var siteFunc = { return Ads.find({'category': 'friendlink'}); }, + getMessageList : function(contentId){ + return Message.find({'contentId' : contentId}) + }, + setDataForIndex: function (req, res, q, title) { var requireField = 'title date commentNum discription sImg'; var documentList = DbOpt.getPaginationResult(Content, req, res, q, requireField); @@ -128,17 +134,18 @@ var siteFunc = { } }, - setDetailInfo: function (req, res, cateQuery, docs) { + setDetailInfo: function (req, res, cateQuery, doc) { var currentCateList = ContentCategory.find(cateQuery).sort({'sortId': 1}); var tagsData = DbOpt.getDatasByParam(ContentTags, req, res, {}); return { - siteConfig: siteFunc.siteInfos(docs.title, docs.discription, docs.keywords), + siteConfig: siteFunc.siteInfos(doc.title, doc.discription, doc.keywords), cateTypes: siteFunc.getCategoryList(), currentCateList: currentCateList, hotItemListData: siteFunc.getHotItemListData({}), newItemListData: siteFunc.getNewItemListData({}), friendLinkData: siteFunc.getFriendLink(), - documentInfo: docs, + documentInfo: doc, + messageList : siteFunc.getMessageList(doc._id), pageType: 'detail', logined: isLogined(req), layout: 'web/public/defaultTemp' diff --git a/views/web/public/confirmEmail.ejs b/views/web/public/confirmEmail.ejs index 1158fc4..5e7d3c3 100644 --- a/views/web/public/confirmEmail.ejs +++ b/views/web/public/confirmEmail.ejs @@ -1,4 +1,4 @@ - +
请输入您的用户名或电子邮箱地址。您会收到一封包含创建新密码链接的电子邮件。
@@ -16,6 +16,7 @@
- - @@ -31,7 +29,7 @@ - + <%- include header %> diff --git a/views/web/public/header.ejs b/views/web/public/header.ejs index 7da0a23..606be74 100644 --- a/views/web/public/header.ejs +++ b/views/web/public/header.ejs @@ -1,7 +1,4 @@ -