Browse Source

首页热门榜单跳转调整

home_hotList^2
ld0104 2 years ago
parent
commit
f9b1e67473
  1. 2
      pages/activity/GroupDetails/index.vue
  2. 2
      pages/activity/activity/index.vue
  3. 52
      pages/home/index.vue
  4. 32
      pages/shop/HotNewGoods/index.vue

2
pages/activity/GroupDetails/index.vue

@ -599,7 +599,7 @@ export default {
openTeam: function() {
var that = this
console.log(this.attr)
if(this.subType) this.subscribeMessage()
if(this.subType && this.$yroute.query.tabType==0) this.subscribeMessage()
if (that.attr.cartAttr == false) { //
console.log(this.attr.cartAttr)
that.attr.cartAttr = !this.attr.cartAttr

2
pages/activity/activity/index.vue

@ -257,7 +257,7 @@
} else if (this.activityType === 1) {
this.$yrouter.push({
path: '/pages/activity/GroupDetails/index',
query: { id }
query: { id,tabType:this.tabType }
})
} else {
let isParticipation=item.isParticipation

52
pages/home/index.vue

@ -134,13 +134,13 @@
<view class="title">热门榜单</view>
</view>
</view>
<swiper previous-margin="32rpx" class="scroll-hot" :style="'height:'+heightSwiper+'rpx;'">
<swiper previous-margin="32rpx" class="scroll-hot" :style="'height:'+heightSwiper+'rpx;'" @change="hotNum">
<swiper-item class="scroll-box" v-for="(item,index) in hotList" :key="index">
<view class="hot-item acea-row row-column">
<view class="title-box acea-row row-middle">
<view class="title-box acea-row row-middle" @click="goHot(item)">
<image src="@/static/images/icon-list.png" mode="aspectFill"></image>
<text>{{item.listName}}</text>
</view>
</view>
<view class="goods-list acea-row row-column">
<view class="goods-item acea-row" v-for="(item,index) in topList" :key="index" @tap="goGoodsCon(item)">
<view class="hot-left">
@ -602,6 +602,11 @@
},
methods: {
...mapActions(['getLocation']),
//
hotNum(e){
this.classifyType = e.detail.current
this.goodsList = this.sortData(this.hotList[this.classifyType].productInfo, 4);
},
//
getBargainList() {
if (this.bargainLoaded) return;
@ -757,28 +762,30 @@
// },
// })
// },
// goGoodsCon(item) {
// if(item.isIntegral === 1) {
// this.$yrouter.push({
// path: '/pages/shop/IntegralGoodsCon/index',
// query: {
// id: item.id,
// },
// })
// } else {
// this.$yrouter.push({
// path: '/pages/shop/GoodsCon/index',
// query: {
// id: item.id,
// },
// })
// }
// },
goGoodsCon(item) {
goHot(item){
this.$yrouter.push({
path: '/pages/shop/HotNewGoods/index',
query: {
hotName: item.listName,
},
})
},
goGoodsCon(item) {
if(item.isIntegral === 1) {
this.$yrouter.push({
path: '/pages/shop/IntegralGoodsCon/index',
query: {
id: item.id,
},
})
} else {
this.$yrouter.push({
path: '/pages/shop/GoodsCon/index',
query: {
id: item.id,
},
})
}
},
// goGoodsPromotion() {
// this.$yrouter.push('/pages/shop/GoodsPromotion/index')
@ -796,6 +803,7 @@
// }).exec();
// }, 160)
// },
//
sortData(oArr, length) {
let arr = [];

32
pages/shop/HotNewGoods/index.vue

@ -162,6 +162,7 @@ export default {
};
},
mounted: function() {
// this.titleInfo();
// this.getIndexGroomList();
getBanner(4).then(res => {
@ -191,20 +192,27 @@ export default {
})
return this.hotListData.hotListDTOS
})
this.form.mouth = this.mouthList[0];
this.classifyList = this.hotListData[this.form.mouth].hotListDTOS;
// this.form.hotListId = this.classifyList[this.classifyType].id;
this.form.hotListId = '';
this.subclassList = this.classifyList[this.classifyType].cateDtos;
// this.subclassList.unshift({
// cateId:'',
// cateName:'',
// })
this.subclass = this.subclassList[0];
// this.form.cateId = this.subclass.cateId;
this.form.cateId = ' ';
this.getHotList();
if(this.$yroute.query.hotName){
this.classifyList.forEach((hot,hotIndex)=>{
if(hot.listName===this.$yroute.query.hotName) {
this.subclassList = this.classifyList[hotIndex].cateDtos;
this.subclass = this.subclassList[0];
this.form.cateId = this.subclass.cateId;
this.changeClassify(hotIndex)
}
})
}else{
// this.form.hotListId = this.classifyList[this.classifyType].id;
this.form.hotListId = '';
this.subclassList = this.classifyList[this.classifyType].cateDtos;
this.subclass = this.subclassList[0];
// this.form.cateId = this.subclass.cateId;
this.form.cateId = ' ';
this.getHotList();
}
})
},
//

Loading…
Cancel
Save