后台添加权限管理

This commit is contained in:
luying
2020-09-22 11:10:45 +08:00
parent bcbed5959f
commit 780562979e
13 changed files with 494 additions and 31 deletions
+23 -4
View File
@@ -15,10 +15,29 @@ export default class LoginController extends Controller {
"data": ctx.user
};
}
public async createGmAccount() {
public async getMenu() {
const { ctx } = this;
const {password, name, username, group} = ctx.request.body;
ctx.body = await ctx.service.gmUser.createGmAccount(name, username, password, group);
ctx.body = {
"status": "ok",
"data": [
{
path: '/test',
authority: ['admin'],
routes: [
{
path: '/test/create-role',
authority: ['admin'],
},
{
path: '/test/create-data',
authority: ['admin'],
}
],
}
]
}
}
}