auth.js
826 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/**
* 路由接口映射
* @author h1bomb
*/
//接口主域
exports.domain = 'http://localhost:30012';
//路由配置
exports.res =
[{
route: '/login',
method: 'POST',
view: 'pages/login',
url:'/auth',
isJsonRaw: false,
params: [{
name: 'user',
type: 'String',
maxLength: 16,
minLength: 6,
reg: /^\S{5,10}$/,
message: '必须是6-16位的字符'
},{
name:'password',
type: 'String',
maxLength: 16,
minLength: 6,
reg: /^\S{6,16}/,
message: '必须是6-16位的字符'
}]
},{
route:'/login',
method:'GET',
view: 'pages/index',
noApi:true
},{
route:'/logout',
method:'GET',
noApi:true
},
{
route: '/',
method: 'GET',
view: 'pages/index',
noApi:true
}];