Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pisns-forum-api
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
scrmGroup
pisns-forum-api
Commits
16764b91
Commit
16764b91
authored
Sep 07, 2015
by
陈家荣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
版主申请表
parent
e03e5cbd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
61 additions
and
0 deletions
+61
-0
forumModeratorApply.js
app/models/forumModeratorApply.js
+48
-0
express.js
config/express.js
+13
-0
No files found.
app/models/forumModeratorApply.js
0 → 100644
View file @
16764b91
'use strict'
;
var
mongoose
=
require
(
'mongoose'
),
Schema
=
mongoose
.
Schema
;
//话题广场,板块
var
ForumInfoSchema
=
new
Schema
({
ent_code
:
{
type
:
Number
,
require
:
true
,
index
:
true
},
forumUserId
:
{
type
:
Schema
.
Types
.
ObjectId
,
require
:
true
,
index
:
true
,
ref
:
'ForumUser'
},
applyMsg
:
{
//申请信息
type
:
String
},
applyTime
:
{
//申请时间
type
:
Date
,
require
:
true
,
default
:
Date
.
now
},
throughTime
:
{
//通过时间
type
:
Date
,
require
:
true
},
status
:
{
//状态 0 申请中, 1 通过 , 2 不通过
type
:
Number
,
require
:
true
,
default
:
0
},
infoIds
:
[
//板块ids
{
type
:
String
}
],
created
:
{
type
:
Date
,
required
:
true
,
default
:
Date
.
now
}
},
{
'collection'
:
'pisns_forum_info'
});
module
.
exports
=
mongoose
.
model
(
'ForumInfo'
,
ForumInfoSchema
);
config/express.js
View file @
16764b91
...
...
@@ -61,6 +61,19 @@ module.exports = function(app, config) {
next
();
});
app
.
use
(
function
(
req
,
res
,
next
)
{
if
(
!
req
.
session
){
req
.
session
=
{}
}
req
.
session
.
user
=
{
ent_code
:
100001
};
req
.
session
.
openUser
=
{
openId
:
'1111'
,
integral
:
'100'
,
exp
:
'100'
};
if
(
!
req
.
session
.
user
&&
req
.
query
.
key
&&
req
.
query
.
key
===
'aiwanpai'
)
{
req
.
session
.
user
=
{
ent_code
:
100041
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment