Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wenHuaBu_adminServer
Overview
Overview
Details
Activity
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
node_server
wenHuaBu_adminServer
Commits
023f20cc
Commit
023f20cc
authored
Mar 21, 2024
by
chenjinjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
df22e792
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
+21
-0
rightsMgmt.ts
src/biz/member/rightsMgmt.ts
+14
-0
router.ts
src/routers/member/router.ts
+7
-0
No files found.
src/biz/member/rightsMgmt.ts
View file @
023f20cc
...
...
@@ -147,6 +147,20 @@ export async function info({id}) {
/**
* 删除
* @param id 列表返回的userId
*/
export
async
function
deleteAdmin
({
userId
,
id
})
{
let
userInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
{
userId
:
id
},
[
"userId"
,
"memberState"
]);
if
(
!
userInfo
||
!
userInfo
.
userId
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
);
await
updateOneData
(
TABLEENUM
.
用户表
,
{
userId
:
id
},
{
isAdmin
:
STATE
.
否
});
return
sysTools
.
successResult
();
}
/**
* 权限下拉列表
*/
export
async
function
mgmtSelectList
()
{
...
...
src/routers/member/router.ts
View file @
023f20cc
...
...
@@ -610,6 +610,13 @@ export const Config = {
bindBiz
:
rightsMgmtBiz
.
freeze
},
{
apiName
:
"删除管理员"
,
subUrl
:
'/rightsmgmt/deleteadmin'
,
param
:[
],
bindBiz
:
rightsMgmtBiz
.
deleteAdmin
},
{
apiName
:
"权限下拉列表"
,
subUrl
:
'/rightsmgmt/mgmtselectlist'
,
param
:[
...
...
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