Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zjxcxServer
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
zjxcxServer
Commits
426ea42a
Commit
426ea42a
authored
Feb 10, 2023
by
孙香冬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
149eaf28
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
admin.ts
src/routers/admin.ts
+3
-3
tools.ts
src/util/tools.ts
+1
-1
No files found.
src/routers/admin.ts
View file @
426ea42a
...
@@ -61,7 +61,7 @@ async function fuHuaQiBaseList(req, res) {
...
@@ -61,7 +61,7 @@ async function fuHuaQiBaseList(req, res) {
* @param res
* @param res
*/
*/
async
function
getFuHuaQiUserList
(
req
,
res
)
{
async
function
getFuHuaQiUserList
(
req
,
res
)
{
let
reqConf
=
{
operationName
:
'
String'
,
page
:
'N
umber'
};
let
reqConf
=
{
operationName
:
'
string'
,
page
:
'n
umber'
};
let
{
operationName
,
page
}
=
checkReqParam
(
reqConf
,
req
.
body
);
let
{
operationName
,
page
}
=
checkReqParam
(
reqConf
,
req
.
body
);
const
Uscc
=
req
.
headers
.
uscc
;
const
Uscc
=
req
.
headers
.
uscc
;
...
@@ -91,7 +91,7 @@ async function fuHuaQiBaseList(req, res) {
...
@@ -91,7 +91,7 @@ async function fuHuaQiBaseList(req, res) {
* @param res
* @param res
*/
*/
async
function
getEnterpriseList
(
req
,
res
)
{
async
function
getEnterpriseList
(
req
,
res
)
{
let
reqConf
=
{
time
:
'
Number'
,
fuHuaQiUscc
:
'String'
,
industry
:
'Number'
,
isNaturalPersonHolding
:
'Boolean'
,
page
:
'N
umber'
};
let
reqConf
=
{
time
:
'
number'
,
fuHuaQiUscc
:
'string'
,
industry
:
'number'
,
isNaturalPersonHolding
:
'boolean'
,
page
:
'n
umber'
};
let
{
time
,
fuHuaQiUscc
,
industry
,
isNaturalPersonHolding
,
page
}
=
checkReqParam
(
reqConf
,
req
.
body
);
let
{
time
,
fuHuaQiUscc
,
industry
,
isNaturalPersonHolding
,
page
}
=
checkReqParam
(
reqConf
,
req
.
body
);
const
Uscc
=
req
.
headers
.
uscc
;
const
Uscc
=
req
.
headers
.
uscc
;
...
@@ -106,7 +106,7 @@ async function fuHuaQiBaseList(req, res) {
...
@@ -106,7 +106,7 @@ async function fuHuaQiBaseList(req, res) {
* @param res
* @param res
*/
*/
async
function
updateState
(
req
,
res
)
{
async
function
updateState
(
req
,
res
)
{
let
reqConf
=
{
userState
:
'
Boolean'
,
uscc
:
'S
tring'
};
let
reqConf
=
{
userState
:
'
boolean'
,
uscc
:
's
tring'
};
let
{
userState
,
uscc
}
=
checkReqParam
(
reqConf
,
req
.
body
);
let
{
userState
,
uscc
}
=
checkReqParam
(
reqConf
,
req
.
body
);
const
Uscc
=
req
.
headers
.
uscc
;
const
Uscc
=
req
.
headers
.
uscc
;
...
...
src/util/tools.ts
View file @
426ea42a
...
@@ -102,7 +102,7 @@ export function getPwdMd5(uscc:string, pwd:string) {
...
@@ -102,7 +102,7 @@ export function getPwdMd5(uscc:string, pwd:string) {
*/
*/
export
function
checkReqParam
(
conf
,
param
)
{
export
function
checkReqParam
(
conf
,
param
)
{
for
(
let
key
in
conf
)
{
for
(
let
key
in
conf
)
{
if
(
!
param
[
key
]
)
throw
new
BizError
(
ERRORENUM
.
参数错误
,
`缺失
${
key
}
字段`
);
if
(
param
[
key
]
!=
'boolean'
&&
!
param
[
key
]
)
throw
new
BizError
(
ERRORENUM
.
参数错误
,
`缺失
${
key
}
字段`
);
let
type
=
typeof
param
[
key
];
let
type
=
typeof
param
[
key
];
switch
(
conf
[
key
])
{
switch
(
conf
[
key
])
{
case
'Number'
:
case
'Number'
:
...
...
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