|
@@ -348,18 +348,30 @@ export default {
|
|
|
let node2 = this.top_list[i+1];
|
|
let node2 = this.top_list[i+1];
|
|
|
if(node2 && top_page >= node1 && top_page < node2){
|
|
if(node2 && top_page >= node1 && top_page < node2){
|
|
|
this.classIndex = i;
|
|
this.classIndex = i;
|
|
|
- this.filterProductInfo[this.classIndex].isActive = true;
|
|
|
|
|
- this.filterProductInfo[this.classIndex+1].isActive = true;
|
|
|
|
|
|
|
+ if(this.filterProductInfo[this.classIndex]){
|
|
|
|
|
+ this.filterProductInfo[this.classIndex].isActive = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(this.filterProductInfo[this.classIndex+1]){
|
|
|
|
|
+ this.filterProductInfo[this.classIndex+1].isActive = true;
|
|
|
|
|
+ }
|
|
|
if(this.filterProductInfo[this.classIndex+1].child.length<5){
|
|
if(this.filterProductInfo[this.classIndex+1].child.length<5){
|
|
|
- this.filterProductInfo[this.classIndex+2].isActive = true;
|
|
|
|
|
|
|
+ if(this.filterProductInfo[this.classIndex+2]){
|
|
|
|
|
+ this.filterProductInfo[this.classIndex+2].isActive = true;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
break;
|
|
break;
|
|
|
}else if(node2 && top_page === node2){
|
|
}else if(node2 && top_page === node2){
|
|
|
this.classIndex = i + 1;
|
|
this.classIndex = i + 1;
|
|
|
- this.filterProductInfo[this.classIndex].isActive = true;
|
|
|
|
|
- this.filterProductInfo[this.classIndex+1].isActive = true;
|
|
|
|
|
|
|
+ if(this.filterProductInfo[this.classIndex]){
|
|
|
|
|
+ this.filterProductInfo[this.classIndex].isActive = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(this.filterProductInfo[this.classIndex+1]){
|
|
|
|
|
+ this.filterProductInfo[this.classIndex+1].isActive = true;
|
|
|
|
|
+ }
|
|
|
if(this.filterProductInfo[this.classIndex+1].child.length<5){
|
|
if(this.filterProductInfo[this.classIndex+1].child.length<5){
|
|
|
- this.filterProductInfo[this.classIndex+2].isActive = true;
|
|
|
|
|
|
|
+ if(this.filterProductInfo[this.classIndex+2]){
|
|
|
|
|
+ this.filterProductInfo[this.classIndex+2].isActive = true;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
@@ -897,20 +909,27 @@ export default {
|
|
|
suit_async_detail_msg(options){
|
|
suit_async_detail_msg(options){
|
|
|
//options 为滚动信息。 options.detail.scrollTop 值为相对于scroll-view。
|
|
//options 为滚动信息。 options.detail.scrollTop 值为相对于scroll-view。
|
|
|
let top_page = options.detail.scrollTop + this.suit_top_list[0];
|
|
let top_page = options.detail.scrollTop + this.suit_top_list[0];
|
|
|
-
|
|
|
|
|
for(let i = 0;i < this.suit_top_list.length; i++){
|
|
for(let i = 0;i < this.suit_top_list.length; i++){
|
|
|
let node1 = this.suit_top_list[i];
|
|
let node1 = this.suit_top_list[i];
|
|
|
let node2 = this.suit_top_list[i+1];
|
|
let node2 = this.suit_top_list[i+1];
|
|
|
if(node2 && top_page >= node1 && top_page < node2){
|
|
if(node2 && top_page >= node1 && top_page < node2){
|
|
|
this.suitClassIndex = i;
|
|
this.suitClassIndex = i;
|
|
|
- this.suitFilterProductInfo[this.suitClassIndex].isActive = true;
|
|
|
|
|
- this.suitFilterProductInfo[this.suitClassIndex+1].isActive = true;
|
|
|
|
|
|
|
+ if(this.suitFilterProductInfo[this.suitClassIndex]){
|
|
|
|
|
+ this.suitFilterProductInfo[this.suitClassIndex].isActive = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(this.suitFilterProductInfo[this.suitClassIndex+1]){
|
|
|
|
|
+ this.suitFilterProductInfo[this.suitClassIndex+1].isActive = true;
|
|
|
|
|
+ }
|
|
|
// this.suitScrollPushList();
|
|
// this.suitScrollPushList();
|
|
|
break;
|
|
break;
|
|
|
}else if(node2 && top_page === node2){
|
|
}else if(node2 && top_page === node2){
|
|
|
this.suitClassIndex = i + 1;
|
|
this.suitClassIndex = i + 1;
|
|
|
- this.suitFilterProductInfo[this.suitClassIndex].isActive = true;
|
|
|
|
|
- this.suitFilterProductInfo[this.suitClassIndex+1].isActive = true;
|
|
|
|
|
|
|
+ if(this.suitFilterProductInfo[this.suitClassIndex]){
|
|
|
|
|
+ this.suitFilterProductInfo[this.suitClassIndex].isActive = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(this.suitFilterProductInfo[this.suitClassIndex+1]){
|
|
|
|
|
+ this.suitFilterProductInfo[this.suitClassIndex+1].isActive = true;
|
|
|
|
|
+ }
|
|
|
// this.suitScrollPushList();
|
|
// this.suitScrollPushList();
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
@@ -918,7 +937,9 @@ export default {
|
|
|
},
|
|
},
|
|
|
suit_scroll_bottom(){
|
|
suit_scroll_bottom(){
|
|
|
this.suitClassIndex = this.suitFilterProductInfo.length-1
|
|
this.suitClassIndex = this.suitFilterProductInfo.length-1
|
|
|
- this.suitFilterProductInfo[this.suitClassIndex].isActive = true;
|
|
|
|
|
|
|
+ if(this.suitFilterProductInfo[this.suitClassIndex]){
|
|
|
|
|
+ this.suitFilterProductInfo[this.suitClassIndex].isActive = true;
|
|
|
|
|
+ }
|
|
|
// this.suitScrollPushList();
|
|
// this.suitScrollPushList();
|
|
|
},
|
|
},
|
|
|
//搜索对应花材
|
|
//搜索对应花材
|