1
This commit is contained in:
parent
0ca1cb8d08
commit
37a0b58d53
@ -1,34 +1,36 @@
|
|||||||
const common = require('./common');
|
const common = require('./common');
|
||||||
|
|
||||||
exports.User = class {
|
module.exports = class {
|
||||||
|
|
||||||
const apis = [
|
constructor() {
|
||||||
{
|
this.apis = [
|
||||||
'method': 'GET',
|
{
|
||||||
'name': 'login',
|
'method': 'GET',
|
||||||
'desc': '用户登录',
|
'name': 'login',
|
||||||
'group': 'User',
|
'desc': '用户登录',
|
||||||
'url': 'api/v1/user/login',
|
'group': 'User',
|
||||||
'params': [
|
'url': 'api/v1/user/login',
|
||||||
['account', '', '账号'],
|
'params': [
|
||||||
['passwd', '', '密码']
|
['account', '', '账号'],
|
||||||
],
|
['passwd', '', '密码']
|
||||||
'response': [
|
],
|
||||||
new common.RspHead(),
|
'response': [
|
||||||
]
|
new common.RspHead(),
|
||||||
},
|
]
|
||||||
{
|
},
|
||||||
'method': 'GET',
|
{
|
||||||
'name': 'info',
|
'method': 'GET',
|
||||||
'desc': '用户登录',
|
'name': 'info',
|
||||||
'group': 'User',
|
'desc': '用户登录',
|
||||||
'url': 'api/v1/user/info/:user_id',
|
'group': 'User',
|
||||||
'params': [
|
'url': 'api/v1/user/info/:user_id',
|
||||||
],
|
'params': [
|
||||||
'response': [
|
],
|
||||||
new common.RspHead(),
|
'response': [
|
||||||
]
|
new common.RspHead(),
|
||||||
},
|
]
|
||||||
];
|
},
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -1,15 +1,19 @@
|
|||||||
exports.ReqHead = class {
|
exports.ReqHead = class {
|
||||||
|
|
||||||
const fields = [
|
constructor() {
|
||||||
];
|
this.fields = [
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.RspHead = class {
|
exports.RspHead = class {
|
||||||
|
|
||||||
const fields = [
|
constructor() {
|
||||||
['errcode', 0, '错误码/0 成功;1 失败'],
|
this.fields = [
|
||||||
['errmsg', '', '错误描述'],
|
['errcode', 0, '错误码/0 成功;1 失败'],
|
||||||
];
|
['errmsg', '', '错误描述'],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -25,7 +25,11 @@ class Doc
|
|||||||
}
|
}
|
||||||
const files = fs.readdirSync('./', {encoding:'utf8', withFileTypes:true});
|
const files = fs.readdirSync('./', {encoding:'utf8', withFileTypes:true});
|
||||||
files.forEach((item) => {
|
files.forEach((item) => {
|
||||||
console.log(item);
|
if (item.name.slice(-3) == '.js' &&
|
||||||
|
item.name != 'common.js') {
|
||||||
|
//console.log(require('./' + item.name.slice(0, -3)));
|
||||||
|
console.log(require('/home/azw/pub/game2006go/doc/admin/User'));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user