|
|
@@ -271,7 +271,7 @@ export default {
|
|
|
...mapState(['userInfo', 'barHeight']),
|
|
|
hotProductsList() {
|
|
|
return this.hotProducts.map(item => {
|
|
|
- return { name: this.getName(item), products: item.products, img: item.img };
|
|
|
+ return { name: this.getName(item), products: item.products, mainProduct: item.mainProduct };
|
|
|
});
|
|
|
},
|
|
|
nowProductsList() {
|
|
|
@@ -279,14 +279,12 @@ export default {
|
|
|
|
|
|
return list;
|
|
|
},
|
|
|
+ nowHotProductInfo() {
|
|
|
+ const allList = [...this.hotProductsList];
|
|
|
+ return allList[Number(this.activeIndex)] ? allList[Number(this.activeIndex)] : {};
|
|
|
+ },
|
|
|
mainProductInfo() {
|
|
|
- const list = [...this.nowProductsList];
|
|
|
- let info = list.shift() || {};
|
|
|
- if (this.hotProductsList[this.hotActive] && this.hotProductsList[this.hotActive].img) {
|
|
|
- info.img = this.hotProductsList[this.hotActive].img;
|
|
|
- }
|
|
|
-
|
|
|
- return info;
|
|
|
+ return { ...this.nowHotProductInfo }.mainProduct;
|
|
|
},
|
|
|
swiperProduct() {
|
|
|
const list = [...this.nowProductsList];
|