Authored by weiqingting

4.6.3

... ... @@ -139,19 +139,15 @@ Controller.prototype.client=function(res,views,model,clientmodel){
ViewModel="<script>var ViewModel="+JSON.stringify(model)+";</script>";
var src="";
src="http://cdn.yoho.cn/"+config.name+"/"+config.version;
if(process.env.NODE_ENV==="production"){
src="http://cdn.yoho.cn/"+config.name+"/"+config.version;
html=html.replace(/\/static\/index\.min\.css/g,function($1){
return src+"/index.min.css";
})
// if(process.env.NODE_ENV==="production"){
// 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";
// }
}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(''));
... ...
... ... @@ -77,6 +77,7 @@ module.exports={
}
});
//获取店铺
console.log("店铺URL:"+Iaccount.getShopList);
request.post({
'url': Iaccount.getShopList,
'headers': {
... ... @@ -127,6 +128,7 @@ module.exports={
}
});
} else {
console.log(error3);
return callback(null, result);
}
});
... ...
... ... @@ -139,11 +139,14 @@ Controller.prototype.client=function(res,views,model,clientmodel){
ViewModel="<script>var ViewModel="+JSON.stringify(model)+";</script>";
var src="";
if(process.env.NODE_ENV==="production"){
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>'];
... ...
{"name":"yohobuy-shops-fe","version":"4.6.1","description":"Construction of the presentation layer solution is based on express, handlebars","main":"app.js","scripts":{"code":"set NODE_ENV=coding&& gulp start","server":"set NODE_ENV=server&& gulp start"},"dependencies":{"art-template":"^3.0.3","async":"^2.0.0-rc.3","body-parser":"^1.15.0","connect-multiparty":"^2.0.0","connect-redis":"^3.0.2","cookie-parser":"^1.4.1","express":"^4.13.4","express-session":"^1.13.0","lodash":"^4.11.1","md5":"^2.1.0","mkdirp":"^0.5.1","request":"^2.72.0","winston":"^2.2.0","glob":"^7.0.3"}}
\ No newline at end of file
{"name":"yohobuy-shops-fe","version":"4.6.3","description":"Construction of the presentation layer solution is based on express, handlebars","main":"app.js","scripts":{"code":"set NODE_ENV=coding&& gulp start","server":"set NODE_ENV=server&& gulp start"},"dependencies":{"art-template":"^3.0.3","async":"^2.0.0-rc.3","body-parser":"^1.15.0","connect-multiparty":"^2.0.0","connect-redis":"^3.0.2","cookie-parser":"^1.4.1","express":"^4.13.4","express-session":"^1.13.0","lodash":"^4.11.1","md5":"^2.1.0","mkdirp":"^0.5.1","request":"^2.72.0","winston":"^2.2.0","glob":"^7.0.3"}}
\ No newline at end of file
... ...