diff --git a/components/tab-bar/postList.vue b/components/tab-bar/postList.vue index edbc7a2..3c093a9 100644 --- a/components/tab-bar/postList.vue +++ b/components/tab-bar/postList.vue @@ -120,6 +120,10 @@ > {{item.xiangyao}} + + + {{item.browseCount}} + @@ -208,7 +212,7 @@ imageKey: 'graduation', action: 'mine' }], - baseCategories: ['推荐', '最新'], + baseCategories: ['推荐', '最新', '热门'], categoryList: [], goodsList: [], pageNum: 1, @@ -518,7 +522,7 @@ const category = this.categories[this.categoryIndex] const categoryItem = this.categoryList.find(item => item.name == category) const area = this.getArea() - const sortType = this.sortType || (category == '附近' ? 'school' : (category == '最新' ? 'latest' : 'hot')) + const sortType = category == '热门' ? 'favorite' : (category == '最新' ? 'latest' : (this.sortType || (category == '附近' ? 'school' : 'hot'))) const query = { pageNum: this.pageNum, pageSize: this.pageSize, @@ -553,6 +557,7 @@ price: isWant ? (item.expectedPrice || 0) : (item.price || 0), originalPrice: item.originPrice, xiangyao: item.likeCount || 0, + browseCount: item.browseCount || 0, distance: item.distance || '本校', icon: item.userAvatar || '/static/images/img/songshu.png', shopName: item.userName || '校园同学', @@ -985,6 +990,7 @@ } .category-row { + margin-top: -15rpx; height: 80rpx; display: flex; align-items: center; @@ -1193,6 +1199,15 @@ font-size: 17rpx; } + .browse-count { + margin-left: 10rpx; + display: flex; + align-items: center; + gap: 3rpx; + color: #a1aaa6; + font-size: 17rpx; + } + .page-like-effect { position: fixed; top: 0;