Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
da904660
Commit
da904660
authored
Jul 11, 2020
by
蒋勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d
parent
fd658481
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
26 deletions
+26
-26
center-manage/app/base/controller/ctl.base.js
+23
-23
center-manage/app/base/system.js
+3
-3
No files found.
center-manage/app/base/controller/ctl.base.js
View file @
da904660
...
@@ -55,7 +55,7 @@ class CtlBase {
...
@@ -55,7 +55,7 @@ class CtlBase {
credid
:
req
.
headers
[
"x-credential-identifier"
],
credid
:
req
.
headers
[
"x-credential-identifier"
],
regrole
:
req
.
headers
[
"xregrole"
],
regrole
:
req
.
headers
[
"xregrole"
],
bizpath
:
req
.
headers
[
"xbizpath"
],
bizpath
:
req
.
headers
[
"xbizpath"
],
code
titl
e
:
req
.
headers
[
"xcodename"
],
code
nam
e
:
req
.
headers
[
"xcodename"
],
codetitle
:
req
.
headers
[
"xcodetitle"
]?
decodeURI
(
req
.
headers
[
"xcodetitle"
]):
''
,
codetitle
:
req
.
headers
[
"xcodetitle"
]?
decodeURI
(
req
.
headers
[
"xcodetitle"
]):
''
,
}
}
if
(
!
req
.
xctx
.
appkey
){
if
(
!
req
.
xctx
.
appkey
){
...
@@ -103,31 +103,31 @@ class CtlBase {
...
@@ -103,31 +103,31 @@ class CtlBase {
// }
// }
//req.session=redis缓存的上下文对象
//req.session=redis缓存的上下文对象
var
rtn
=
await
this
[
methodname
](
pobj
,
query
,
req
);
var
rtn
=
await
this
[
methodname
](
pobj
,
query
,
req
);
//
rtn.requestId=this.getUUID()
rtn
.
requestId
=
this
.
getUUID
()
//
req.params.param=pobj
req
.
params
.
param
=
pobj
// system.execLogs(req.xctx.codetitle,req.params,null
,rtn,null).then(res=>{
system
.
execLogs
(
req
.
xctx
.
codetitle
,
req
.
params
,
req
.
xctx
.
codename
,
rtn
,
null
).
then
(
res
=>
{
//
if(res && res.status==1){
if
(
res
&&
res
.
status
==
1
){
//
console.log("log.....success")
console
.
log
(
"log.....success"
)
//
}else{
}
else
{
//
console.log("log.....fail")
console
.
log
(
"log.....fail"
)
//
}
}
//
}).catch(e=>{
}).
catch
(
e
=>
{
//
console.log("log.....fail")
console
.
log
(
"log.....fail"
)
//
})
})
return
rtn
;
return
rtn
;
}
catch
(
e
)
{
}
catch
(
e
)
{
let
rtn
=
{}
let
rtn
=
{}
//
rtn.requestId=this.getUUID()
rtn
.
requestId
=
this
.
getUUID
()
//
req.params.param=pobj
req
.
params
.
param
=
pobj
//
system.execLogs(req.xctx.codetitle,req.params,null,rtn,e).then(res=>{
system
.
execLogs
(
req
.
xctx
.
codetitle
,
req
.
params
,
null
,
rtn
,
e
).
then
(
res
=>
{
//
if(res && res.status==1){
if
(
res
&&
res
.
status
==
1
){
//
console.log("log.....success")
console
.
log
(
"log.....success"
)
//
}else{
}
else
{
//
console.log("log.....fail")
console
.
log
(
"log.....fail"
)
//
}
}
//
}).catch(e=>{
}).
catch
(
e
=>
{
//
console.log("log.....fail")
console
.
log
(
"log.....fail"
)
//
})
})
console
.
log
(
e
.
stack
,
"出现异常,请联系管理员......."
);
console
.
log
(
e
.
stack
,
"出现异常,请联系管理员......."
);
return
system
.
getResultFail
(
-
200
,
"出现异常,请联系管理员"
);
return
system
.
getResultFail
(
-
200
,
"出现异常,请联系管理员"
);
}
}
...
...
center-manage/app/base/system.js
View file @
da904660
...
@@ -23,8 +23,8 @@ class System {
...
@@ -23,8 +23,8 @@ class System {
url
:
url
,
url
:
url
,
qs
:
qdata
qs
:
qdata
},
function
(
error
,
response
,
body
)
{
},
function
(
error
,
response
,
body
)
{
rtn
.
statusCode
=
response
.
statusCode
if
(
!
error
)
{
if
(
!
error
)
{
rtn
.
statusCode
=
response
.
statusCode
if
(
body
)
{
if
(
body
)
{
let
data
=
JSON
.
parse
(
body
)
let
data
=
JSON
.
parse
(
body
)
rtn
.
data
=
data
rtn
.
data
=
data
...
@@ -47,8 +47,8 @@ class System {
...
@@ -47,8 +47,8 @@ class System {
json
:
true
,
json
:
true
,
qs
:
qdata
qs
:
qdata
},
function
(
error
,
response
,
body
)
{
},
function
(
error
,
response
,
body
)
{
rtn
.
statusCode
=
response
.
statusCode
;
if
(
!
error
)
{
if
(
!
error
)
{
rtn
.
statusCode
=
response
.
statusCode
;
if
(
body
)
{
if
(
body
)
{
rtn
.
data
=
body
rtn
.
data
=
body
}
else
{
}
else
{
...
@@ -75,8 +75,8 @@ class System {
...
@@ -75,8 +75,8 @@ class System {
body
:
data
body
:
data
},
function
(
error
,
response
,
body
)
{
},
function
(
error
,
response
,
body
)
{
console
.
log
(
error
)
console
.
log
(
error
)
rtn
.
statusCode
=
response
.
statusCode
if
(
!
error
)
{
if
(
!
error
)
{
rtn
.
statusCode
=
response
.
statusCode
if
(
body
)
{
if
(
body
)
{
rtn
.
data
=
body
rtn
.
data
=
body
}
else
{
}
else
{
...
...
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