|
@@ -79,13 +79,7 @@ export default { |
|
@@ -79,13 +79,7 @@ export default { |
79
|
isFetch: true,
|
79
|
isFetch: true,
|
80
|
scrollY: 0,
|
80
|
scrollY: 0,
|
81
|
isShowEmpty: false,
|
81
|
isShowEmpty: false,
|
82
|
- yasParams: {
|
|
|
83
|
- P_NAME: 'XY_UFOSecondList',
|
|
|
84
|
- TYPE_ID: 5,
|
|
|
85
|
- TAB_ID: '',
|
|
|
86
|
- TAB_NAME: '',
|
|
|
87
|
- P_PARAM: [].toString()
|
|
|
88
|
- },
|
82
|
+ yasParams: { P_NAME: 'XY_UFOSecondList', TYPE_ID: 5, P_PARAM: [].toString() },
|
89
|
selectedType: 2, // tab类型高亮,1价格,2推荐
|
83
|
selectedType: 2, // tab类型高亮,1价格,2推荐
|
90
|
priceDesc: true,
|
84
|
priceDesc: true,
|
91
|
|
85
|
|
|
@@ -248,7 +242,7 @@ export default { |
|
@@ -248,7 +242,7 @@ export default { |
248
|
this.$refs.scroll.scrollTo(0, 0, 300);
|
242
|
this.$refs.scroll.scrollTo(0, 0, 300);
|
249
|
},
|
243
|
},
|
250
|
|
244
|
|
251
|
- // 点击Tab, 1:价格,2:默认
|
245
|
+ // 点击Tab, 1:价格,2:推荐
|
252
|
async pressType(flag) {
|
246
|
async pressType(flag) {
|
253
|
if (flag === this.selectedType && flag !== 1) {
|
247
|
if (flag === this.selectedType && flag !== 1) {
|
254
|
return;
|
248
|
return;
|
|
@@ -270,9 +264,11 @@ export default { |
|
@@ -270,9 +264,11 @@ export default { |
270
|
}
|
264
|
}
|
271
|
|
265
|
|
272
|
if (flag === 1) {
|
266
|
if (flag === 1) {
|
|
|
267
|
+ this.setYasParam({tab: {index: 2, name: '价格'}});
|
273
|
this.priceDesc = !this.priceDesc;
|
268
|
this.priceDesc = !this.priceDesc;
|
274
|
params.order = this.priceDesc ? 'price:asc' : 'price:desc';
|
269
|
params.order = this.priceDesc ? 'price:asc' : 'price:desc';
|
275
|
} else if (flag === 2) {
|
270
|
} else if (flag === 2) {
|
|
|
271
|
+ this.setYasParam({tab: {index: 5, name: '推荐'}});
|
276
|
this.priceDesc = true;
|
272
|
this.priceDesc = true;
|
277
|
params.order = 'id:desc';
|
273
|
params.order = 'id:desc';
|
278
|
}
|
274
|
}
|
|
@@ -282,6 +278,8 @@ export default { |
|
@@ -282,6 +278,8 @@ export default { |
282
|
params.isReset = true;
|
278
|
params.isReset = true;
|
283
|
await this.fetchList(params);
|
279
|
await this.fetchList(params);
|
284
|
|
280
|
|
|
|
281
|
+ this.yasTab();
|
|
|
282
|
+
|
285
|
this.$refs.scroll.scrollTo(0, 0, 300);
|
283
|
this.$refs.scroll.scrollTo(0, 0, 300);
|
286
|
this.yasShowPage();
|
284
|
this.yasShowPage();
|
287
|
},
|
285
|
},
|
|
@@ -426,6 +424,7 @@ export default { |
|
@@ -426,6 +424,7 @@ export default { |
426
|
},
|
424
|
},
|
427
|
|
425
|
|
428
|
goFilter() {
|
426
|
goFilter() {
|
|
|
427
|
+ this.yasTab(true);
|
429
|
this.$refs.filtrate.show();
|
428
|
this.$refs.filtrate.show();
|
430
|
this.$refs.filtrate.setFilterParam(this.seletedFilterParams);
|
429
|
this.$refs.filtrate.setFilterParam(this.seletedFilterParams);
|
431
|
this.$refs.filtrate.setTempParam(this.selectedFilterNameParams);
|
430
|
this.$refs.filtrate.setTempParam(this.selectedFilterNameParams);
|
|
@@ -449,6 +448,27 @@ export default { |
|
@@ -449,6 +448,27 @@ export default { |
449
|
}
|
448
|
}
|
450
|
});
|
449
|
});
|
451
|
},
|
450
|
},
|
|
|
451
|
+ setYasParam: function({tab}) {
|
|
|
452
|
+ if (tab && typeof tab === 'object' && Object.keys(tab).length) {
|
|
|
453
|
+ this.yasParams.TAB_ID = tab.index;
|
|
|
454
|
+ this.yasParams.TAB_NAME = tab.name;
|
|
|
455
|
+ }
|
|
|
456
|
+ },
|
|
|
457
|
+ yasTab(isFilter = false) {
|
|
|
458
|
+ let param = {...this.yasParams};
|
|
|
459
|
+
|
|
|
460
|
+ if (isFilter) {
|
|
|
461
|
+ param.TAB_ID = 4;
|
|
|
462
|
+ param.TAB_NAME = '筛选';
|
|
|
463
|
+ }
|
|
|
464
|
+
|
|
|
465
|
+ this.$store.dispatch('reportYas', {
|
|
|
466
|
+ params: {
|
|
|
467
|
+ param,
|
|
|
468
|
+ appop: 'XY_UFO_PRD_LIST_TAB_C'
|
|
|
469
|
+ }
|
|
|
470
|
+ });
|
|
|
471
|
+ }
|
452
|
},
|
472
|
},
|
453
|
beforeRouteLeave (to, from, next) {
|
473
|
beforeRouteLeave (to, from, next) {
|
454
|
this.isFetch = to.name !== 'SecondProductDetail'
|
474
|
this.isFetch = to.name !== 'SecondProductDetail'
|
|
@@ -476,6 +496,8 @@ export default { |
|
@@ -476,6 +496,8 @@ export default { |
476
|
}
|
496
|
}
|
477
|
this.filterParams = filterParams;
|
497
|
this.filterParams = filterParams;
|
478
|
|
498
|
|
|
|
499
|
+ this.setYasParam({tab: {index: 5, name: '推荐'}});
|
|
|
500
|
+
|
479
|
} else {
|
501
|
} else {
|
480
|
this.scrollY && this.$refs.scroll.scrollTo(this.scrollY);
|
502
|
this.scrollY && this.$refs.scroll.scrollTo(this.scrollY);
|
481
|
}
|
503
|
}
|