Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
xianyu-ufo-app-web
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
yyq
5 years ago
Commit
9534d3fc6ca9e80cf237f764de0a23a5cc9d04ea
1 parent
99728978
page name & favicon
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
0 deletions
config/ssr-routes.js
create-app.js
doraemon/middleware/ssr.js
favicon.ico
config/ssr-routes.js
View file @
9534d3f
...
...
@@ -3,15 +3,18 @@ module.exports = [
route
:
/xianyu
\/
index
\/
channel/
,
cacheTime
:
60
,
cache
:
true
,
pageName
:
'channel'
},
{
route
:
/xianyu
\/
index/
,
cacheTime
:
60
,
cache
:
true
,
pageName
:
'channel'
},
{
route
:
/xianyu
\/
index
\/
category/
,
cacheTime
:
30
,
cache
:
true
,
pageName
:
'category'
},
];
...
...
create-app.js
View file @
9534d3f
...
...
@@ -8,6 +8,7 @@ const pkg = require('./package.json');
const
devtools
=
require
(
'./doraemon/middleware/devtools'
);
const
_
=
require
(
'lodash'
);
const
uuid
=
require
(
'uuid'
);
const
favicon
=
require
(
'serve-favicon'
);
// 全局注册library
yohoLib
.
global
(
config
);
...
...
@@ -38,6 +39,7 @@ exports.createApp = async(app) => {
}
app
.
set
(
'etag'
,
false
);
app
.
use
(
favicon
(
path
.
join
(
__dirname
,
'./favicon.ico'
)));
app
.
use
(
'/xianyu/node/status.html'
,
(
req
,
res
)
=>
{
res
.
status
(
200
).
end
();
...
...
doraemon/middleware/ssr.js
View file @
9534d3f
...
...
@@ -140,6 +140,7 @@ const render = (route) => {
app
:
config
.
appName
,
ip
:
req
.
yoho
.
clientIp
,
path
:
req
.
url
,
pageName
:
_
.
get
(
route
,
'pageName'
,
'unknown'
),
uid
:
req
.
user
.
uid
,
udid
:
req
.
cookies
.
udid
||
''
,
clientType
:
req
.
yoho
.
clientType
||
''
,
...
...
favicon.ico
View file @
9534d3f
No preview for this file type
Please
register
or
login
to post a comment