|
@@ -17,7 +17,7 @@
|
|
|
<!--头部搜索框-->
|
|
|
<div class="search-cotainer">
|
|
|
<div class="mui-input-row mui-search">
|
|
|
- <input id="search" name="search" class="my-search-ipt" type="text" placeholder='大家都在搜"电动牙刷刷头"'>
|
|
|
+ <input id="search" name="search" class="my-search-ipt" type="text" placeholder='大家都在搜"净水机"'>
|
|
|
</div>
|
|
|
<span class="iconfont icon-caidan"></span>
|
|
|
<span class="my-btn-cancel">取消</span>
|
|
@@ -228,9 +228,11 @@
|
|
|
mui(jingxuan1).each(function(index) {
|
|
|
var li = document.createElement('li');
|
|
|
li.className = 'mui-table-view-cell mui-media mui-col-xs-12';
|
|
|
- console.log(this.productColorList[0].colorDiscount)
|
|
|
- li.innerHTML = '<a name="' + this.productId + '"><img class="mui-media-object" src="' + this.productChoicenessIm + '"><div class="index-pro-tit">' + this.productName + '</div><p class="mui-text-left">' + this.productColorDes + '<span class="f-price">¥' + accDiv(this.productColorList[0].colorDiscount , 100) + '</span></p></a>';
|
|
|
- table.appendChild(li);
|
|
|
+ //console.log(this.productColorList[0].colorDiscount)
|
|
|
+ if(this.productColorList != null && this.productColorList.length > 0){
|
|
|
+ li.innerHTML = '<a name="' + this.productId + '"><img class="mui-media-object" src="' + this.productChoicenessIm + '"><div class="index-pro-tit">' + this.productName + '</div><p class="mui-text-left">' + this.productColorDes + '<span class="f-price">¥' + accDiv(this.productColorList[0].colorDiscount , 100) + '</span></p></a>';
|
|
|
+ table.appendChild(li);
|
|
|
+ }
|
|
|
});
|
|
|
|
|
|
//遍历精选产品(50%宽度)
|
|
@@ -238,8 +240,10 @@
|
|
|
mui(jingxuan2).each(function(index) {
|
|
|
var li = document.createElement('li');
|
|
|
li.className = 'mui-table-view-cell mui-media mui-col-xs-6';
|
|
|
- li.innerHTML = '<a name="' + this.productId + '"><img class="mui-media-object" src="' + this.productChoicenessIm + '"><div class="index-pro-tit">' + this.productName + '</div><p class="mui-text-left">' + this.productColorDes + '</p><p class="l-price">¥' + accDiv(this.productColorList[0].colorDiscount , 100) + '</p></a>';
|
|
|
- table.appendChild(li);
|
|
|
+ if(this.productColorList != null && this.productColorList.length > 0){
|
|
|
+ li.innerHTML = '<a name="' + this.productId + '"><img class="mui-media-object" src="' + this.productChoicenessIm + '"><div class="index-pro-tit">' + this.productName + '</div><p class="mui-text-left">' + this.productColorDes + '</p><p class="l-price">¥' + accDiv(this.productColorList[0].colorDiscount , 100) + '</p></a>';
|
|
|
+ table.appendChild(li);
|
|
|
+ }
|
|
|
});
|
|
|
|
|
|
//遍历菜单
|