Skip to content

Commit d1be99b

Browse files
committed
notice
1 parent f8f26e6 commit d1be99b

File tree

4 files changed

+48
-25
lines changed

4 files changed

+48
-25
lines changed

routes.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ var login = require('./routes/login')
66

77

88
var admin = require('./routes/admin/index')
9-
,adminUser = require('./routes/admin/user.js')
9+
,adminUser = require('./routes/admin/user')
10+
,adminNotice = require('./routes/admin/notice')
1011

1112
module.exports = function(app){
1213
/*===================
@@ -45,8 +46,11 @@ module.exports = function(app){
4546
// 查看&修改用户
4647
app.get('/admin/user/info',adminUser.infouser);
4748
app.post('/admin/user/info',adminUser.infouser);
48-
49-
49+
//------------------
50+
// 公告发布
51+
//------------------
52+
app.get('/admin/notice',adminNotice.index);
53+
app.post('/admin/notice',adminNotice.index);
5054

5155

5256

routes/admin/notice.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/*--------------------------*
2+
* 公告发布 *
3+
*--------------------------*/
4+
var config = require('../../config')
5+
,jixiang = require('../../models/base');
6+
7+
exports.index = function(req,res){
8+
res.render('./admin/notice',{
9+
title : config.name+'公告发布'
10+
,user : req.session.user
11+
});
12+
}

views/admin/index.jade

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,6 @@ extends layout/layout
22
block content
33
//内容区
44
.main
5-
table.table.order-table
6-
caption 学生列表
7-
thead.tab-title
8-
tr.separate
9-
th(colspan="5")
10-
tr
11-
th UID
12-
th 用户名
13-
th 邮箱
14-
th 性别
15-
th 最近登入时间
16-
th 操作
17-
tbody
18-
tr
19-
td 1
20-
td jixiangac
21-
td jixiangac@gmail.com
22-
td 男
23-
td 2012-12-34 20:20:20
24-
td
25-
a.btn-reply(href="#") 查看
26-
a.btn-reply(href="#") 修改
5+
276

287

views/admin/notice.jade

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
extends layout/layout
2+
block content
3+
//内容区
4+
.main
5+
table.table.order-table
6+
caption 学生列表
7+
thead.tab-title
8+
tr.separate
9+
th(colspan="5")
10+
tr
11+
th UID
12+
th 用户名
13+
th 邮箱
14+
th 性别
15+
th 最近登入时间
16+
th 操作
17+
tbody
18+
tr
19+
td 1
20+
td jixiangac
21+
td jixiangac@gmail.com
22+
td 男
23+
td 2012-12-34 20:20:20
24+
td
25+
a.btn-reply(href="#") 查看
26+
a.btn-reply(href="#") 修改
27+
28+

0 commit comments

Comments
 (0)