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
560eb614
Commit
560eb614
authored
Jul 30, 2020
by
v_vjyjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d
parent
610b2eb8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
19 deletions
+4
-19
center-manage/app/config/environment.js
+1
-17
center-manage/app/config/routes/api.js
+3
-2
No files found.
center-manage/app/config/environment.js
View file @
560eb614
...
@@ -19,23 +19,7 @@ module.exports = function (app) {
...
@@ -19,23 +19,7 @@ module.exports = function (app) {
app
.
use
(
bodyParser
.
json
({
limit
:
'50mb'
}));
app
.
use
(
bodyParser
.
json
({
limit
:
'50mb'
}));
app
.
use
(
bodyParser
.
urlencoded
({
limit
:
'50mb'
,
extended
:
true
}));
app
.
use
(
bodyParser
.
urlencoded
({
limit
:
'50mb'
,
extended
:
true
}));
routes
(
app
);
//初始化路由
routes
(
app
);
//初始化路由
app
.
use
(
history
(
app
.
use
(
history
());
{
rewrites
:
[
{
from
:
/.*/
,
to
:
function
(
context
)
{
if
(
context
.
parsedUrl
.
pathname
.
indexOf
(
"autologin"
)
>=
0
)
{
return
context
.
parsedUrl
.
pathname
}
else
{
return
'/index.html'
;
}
}
}
]
}
));
app
.
use
(
express
.
static
(
path
.
join
(
settings
.
basepath
,
'/app/front/entry/public'
)));
app
.
use
(
express
.
static
(
path
.
join
(
settings
.
basepath
,
'/app/front/entry/public'
)));
// development only
// development only
if
(
'development'
==
app
.
get
(
'env'
))
{
if
(
'development'
==
app
.
get
(
'env'
))
{
...
...
center-manage/app/config/routes/api.js
View file @
560eb614
...
@@ -7,7 +7,7 @@ const companyS = System.getObject("service.common.companySve")
...
@@ -7,7 +7,7 @@ const companyS = System.getObject("service.common.companySve")
const
settings
=
require
(
"../settings.js"
)
const
settings
=
require
(
"../settings.js"
)
let
channelCache
=
{};
let
channelCache
=
{};
module
.
exports
=
function
(
app
)
{
module
.
exports
=
function
(
app
)
{
app
.
ge
t
(
"/autologin"
,
async
function
(
req
,
res
,
next
)
{
app
.
pos
t
(
"/autologin"
,
async
function
(
req
,
res
,
next
)
{
let
appkey
=
req
.
query
.
appkey
.
trim
()
let
appkey
=
req
.
query
.
appkey
.
trim
()
if
(
!
appkey
)
{
if
(
!
appkey
)
{
res
.
end
(
"没有资质宝appkey,请联系资质宝服务提供方"
)
res
.
end
(
"没有资质宝appkey,请联系资质宝服务提供方"
)
...
@@ -70,7 +70,8 @@ module.exports = function (app) {
...
@@ -70,7 +70,8 @@ module.exports = function (app) {
uf
=
await
userS
.
registerByTantent
(
reguser
)
uf
=
await
userS
.
registerByTantent
(
reguser
)
}
}
let
rtnobj
=
await
userS
.
loginApp
(
appkey
,
userName
)
let
rtnobj
=
await
userS
.
loginApp
(
appkey
,
userName
)
res
.
redirect
(
rtnobj
.
homePage
+
"?code="
+
rtnobj
.
code
)
let
rtn
=
JSON
.
stringify
({
openurl
:
rtnobj
.
homePage
+
"?code="
+
rtnobj
.
code
})
res
.
end
(
rtn
)
})
})
app
.
post
(
"*"
,
async
function
(
req
,
res
,
next
)
{
app
.
post
(
"*"
,
async
function
(
req
,
res
,
next
)
{
try
{
try
{
...
...
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