Toggle navigation
Toggle navigation
This project
Loading...
Sign in
liuloulou
/
yohobuy-portal-fe2
·
Commits
Go to a project
GitLab
Go to dashboard
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
Plain Diff
Browse Files
Authored by
ZhongW
9 years ago
Commit
6cfe850c1f8c82822e66dcbcfaca93264e5d5fba
2 parents
35c0a35e
b578b102
Merge branch 'grey' of
http://git.yoho.cn/fe/yohobuy-portal-fe2
into grey
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
code/libs/Controller.js
code/libs/Controller.js
View file @
6cfe850
...
...
@@ -140,14 +140,14 @@ Controller.prototype.client=function(res,views,model,clientmodel){
var
src
=
""
;
// if(process.env.NODE_ENV==="production"||process.env.NODE_ENV==="gray"){
// src="http://cdn.yoho.cn/"+config.name+"/"+config.version;
// html=html.replace(/\/static\/index\.min\.css/g,function($1){
// return src+"/index.min.css";
// })
// }else{
if
(
process
.
env
.
NODE_ENV
===
"production"
||
process
.
env
.
NODE_ENV
===
"gray"
){
src
=
"http://cdn.yoho.cn/"
+
config
.
name
+
"/"
+
config
.
version
;
html
=
html
.
replace
(
/
\/
static
\/
index
\.
min
\.
css/g
,
function
(
$1
){
return
src
+
"/index.min.css"
;
})
}
else
{
src
=
"/static"
;
//
}
}
var
script
=
[
'<script type="text/javascript" src="'
+
src
+
'/'
+
clientmodel
+
'/libs.js"></script>'
,
'<script type="text/javascript" src="'
+
src
+
'/'
+
clientmodel
+
'/'
+
views
+
'.js"></script>'
];
res
.
send
(
html
+
ViewModel
+
script
.
join
(
''
));
...
...
Please
register
or
login
to post a comment