var HardCoverVO = function(hardCoverVO, imagPathDomain,clstagId){
if(hardCoverVO.support3d == 1){
this.htmlStr = ''
+'
'
+'整屋'
+''
+'
'
+'
'
+''
+'
'
+'
'
+'' + hardCoverVO.houses.room +'室' + hardCoverVO.houses.hall + '厅'
+'|'
+'' + hardCoverVO.houses.houseArea + '㎡'
+'
'
+'
'
+ this.getArticles(hardCoverVO, imagPathDomain)
+'';
}else {
this.htmlStr = ''
+''
+'整屋'
+''
+'
'
+'
'
+''
+'
'
+'
'
+'' + hardCoverVO.houses.room +'室' + hardCoverVO.houses.hall + '厅'
+'|'
+'' + hardCoverVO.houses.houseArea + '㎡'
+'
'
+'
'
+ this.getArticles(hardCoverVO, imagPathDomain)
+'';
}
}
HardCoverVO.prototype.getHardCoverSkus = function(hardCoverVO){
if(hardCoverVO.articleVos&&hardCoverVO.articleVos.length){
var skusStrArr = [];
hardCoverVO.articleVos.forEach(function(f){
var skusStr = ArticleVO.prototype.getSkus(f);
if(skusStr){
skusStrArr.push(skusStr);
}
});
return skusStrArr.join(",");
}
};
HardCoverVO.prototype.getArticles = function(hardCoverVO, imagPathDomain){
if(hardCoverVO && hardCoverVO.articleVos && hardCoverVO.articleVos.length > 0){
var str = '';
//for(var i = 0; i < hardCoverVO.articleVos.length; i++){
// var article = hardCoverVO.articleVos[i];
// if(article){
// str += '' + article.title + ''
// }
//}
var html = ''
+''
return html;
}
return "";
}
var ArticleVO = function(articleVO, imagPathDomain, clstagId){
if(articleVO.support3d == 1){
this.htmlStr = ''
+''
+''
+'
'
+'
'
+''
+'
'
+'
'+ this.getAnchorsNum(articleVO) + '件单品'
+'
'
+this.getAnchors(articleVO, imagPathDomain);
+'';
}else {
this.htmlStr = ''
+''
+''
+'
'
+'
'
+''
+'
'
+'
'+ this.getAnchorsNum(articleVO) + '件单品'
+'
'
+this.getAnchors(articleVO, imagPathDomain);
+'';
}
}
ArticleVO.prototype.getAnchorsNum = function(articleVO){
if(articleVO && articleVO.articleAnchorVos2D){
return articleVO.articleAnchorVos2D.length;
}else{
return 0;
}
}
ArticleVO.prototype.getSkus = function(articleVO){
if(articleVO && articleVO.articleAnchorVos2D && articleVO.articleAnchorVos2D.length > 0){
var str = "";
for(var i = 0; i < articleVO.articleAnchorVos2D.length; i++){
var skus = articleVO.articleAnchorVos2D[i].skus;
if(skus && skus.length > 0){
str += 'J_' + skus[0].skuId + ",";
}
}
return str.substr(0, str.length - 1);
}
return "";
}
ArticleVO.prototype.getAnchors = function(articleVO, imagPathDomain){
if(articleVO && articleVO.picList && articleVO.picList.length > 0){
var str = '';
for(var i = 0; i < articleVO.picList.length; i++){
str += '';
}
var html = ''
+'';
return html;
}
return "";
}