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
8ca4629c
Commit
8ca4629c
authored
Sep 23, 2020
by
Sxy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 界面乱码
parent
8f814c47
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
16 deletions
+17
-16
center-manage/app/config/routes/web.js
+17
-16
No files found.
center-manage/app/config/routes/web.js
View file @
8ca4629c
var
url
=
require
(
"url"
);
var
url
=
require
(
"url"
);
var
system
=
require
(
"../../base/system"
);
var
system
=
require
(
"../../base/system"
);
var
metaCtl
=
system
.
getObject
(
"web.common.metaCtl"
);
var
metaCtl
=
system
.
getObject
(
"web.common.metaCtl"
);
module
.
exports
=
function
(
app
)
{
module
.
exports
=
function
(
app
)
{
app
.
get
(
'/web/:gname/:qname/:method'
,
function
(
req
,
res
)
{
app
.
get
(
'/web/:gname/:qname/:method'
,
function
(
req
,
res
)
{
var
classPath
=
req
.
params
[
"qname"
];
var
classPath
=
req
.
params
[
"qname"
];
var
methodName
=
req
.
params
[
"method"
];
var
methodName
=
req
.
params
[
"method"
];
var
gname
=
req
.
params
[
"gname"
];
var
gname
=
req
.
params
[
"gname"
];
classPath
=
gname
+
"."
+
classPath
;
classPath
=
gname
+
"."
+
classPath
;
var
params
=
[];
var
params
=
[];
params
.
push
(
methodName
);
params
.
push
(
methodName
);
params
.
push
(
req
.
body
);
params
.
push
(
req
.
body
);
params
.
push
(
req
.
query
);
params
.
push
(
req
.
query
);
params
.
push
(
req
);
params
.
push
(
req
);
var
p
=
null
;
var
p
=
null
;
var
invokeObj
=
system
.
getObject
(
"web."
+
classPath
);
var
invokeObj
=
system
.
getObject
(
"web."
+
classPath
);
if
(
invokeObj
[
"doexec"
])
{
if
(
invokeObj
[
"doexec"
])
{
...
@@ -24,25 +24,26 @@ module.exports = function (app) {
...
@@ -24,25 +24,26 @@ module.exports = function (app) {
app
.
post
(
'/web/:gname/:qname/:method'
,
function
(
req
,
res
)
{
app
.
post
(
'/web/:gname/:qname/:method'
,
function
(
req
,
res
)
{
req
.
codepath
=
req
.
headers
[
"codepath"
];
req
.
codepath
=
req
.
headers
[
"codepath"
];
var
classPath
=
req
.
params
[
"qname"
];
var
classPath
=
req
.
params
[
"qname"
];
var
methodName
=
req
.
params
[
"method"
];
var
methodName
=
req
.
params
[
"method"
];
var
gname
=
req
.
params
[
"gname"
];
var
gname
=
req
.
params
[
"gname"
];
var
params
=
[];
var
params
=
[];
classPath
=
gname
+
"."
+
classPath
;
classPath
=
gname
+
"."
+
classPath
;
var
tClientIp
=
system
.
get_client_ip
(
req
);
var
tClientIp
=
system
.
get_client_ip
(
req
);
req
.
body
.
clientIp
=
tClientIp
;
req
.
body
.
clientIp
=
tClientIp
;
req
.
body
.
agent
=
req
.
headers
[
"user-agent"
];
req
.
body
.
agent
=
req
.
headers
[
"user-agent"
];
req
.
body
.
classname
=
classPath
;
req
.
body
.
classname
=
classPath
;
params
.
push
(
methodName
);
params
.
push
(
methodName
);
params
.
push
(
req
.
body
);
params
.
push
(
req
.
body
);
params
.
push
(
req
.
query
);
params
.
push
(
req
.
query
);
params
.
push
(
req
);
params
.
push
(
req
);
var
p
=
null
;
var
p
=
null
;
var
invokeObj
=
system
.
getObject
(
"web."
+
classPath
);
var
invokeObj
=
system
.
getObject
(
"web."
+
classPath
);
if
(
invokeObj
[
"doexec"
])
{
if
(
invokeObj
[
"doexec"
])
{
p
=
invokeObj
[
"doexec"
].
apply
(
invokeObj
,
params
);
p
=
invokeObj
[
"doexec"
].
apply
(
invokeObj
,
params
);
}
}
p
.
then
(
r
=>
{
p
.
then
(
r
=>
{
res
.
end
(
JSON
.
stringify
(
r
));
// res.end(JSON.stringify(r));
res
.
json
(
r
);
});
});
});
});
};
};
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