-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rbac Co-Authored-By: icenotu <[email protected]>
- Loading branch information
Showing
10 changed files
with
124 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
'use strict'; | ||
|
||
const Controller = require('egg').Controller; | ||
|
||
class AccessController extends Controller { | ||
async index() { | ||
this.ctx.body = '权限管理'; | ||
} | ||
async add() { | ||
this.ctx.body = '权限增加'; | ||
} | ||
async edit() { | ||
this.ctx.body = '权限编辑'; | ||
} | ||
async delete() { | ||
this.ctx.body = '权限删除'; | ||
} | ||
} | ||
|
||
module.exports = AccessController; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
'use strict'; | ||
|
||
const Controller = require('egg').Controller; | ||
|
||
class ManagerController extends Controller { | ||
async index() { | ||
await this.ctx.render('admin/manager/index',{ | ||
username:'chrisYoung', | ||
}); | ||
} | ||
async add() { | ||
this.ctx.body = '管理员增加'; | ||
} | ||
async edit() { | ||
this.ctx.body = '管理员编辑'; | ||
} | ||
async delete() { | ||
this.ctx.body = '管理员删除'; | ||
} | ||
} | ||
|
||
module.exports = ManagerController; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
'use strict'; | ||
|
||
const Controller = require('egg').Controller; | ||
|
||
class RoleController extends Controller { | ||
async index() { | ||
this.ctx.body = '角色管理'; | ||
} | ||
async add() { | ||
this.ctx.body = '角色增加'; | ||
} | ||
async edit() { | ||
this.ctx.body = '角色编辑'; | ||
} | ||
async delete() { | ||
this.ctx.body = '角色删除'; | ||
} | ||
} | ||
|
||
module.exports = RoleController; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
<title>管理员管理</title> | ||
</head> | ||
<body> | ||
<h2>hello world ejs--<%= username %> </h2> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
<title>首页</title> | ||
</head> | ||
<body> | ||
<h2>hello world nunjucks--{{username }}</h2> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters