wangfukang 7 days ago
parent
commit
9302f9a0c1
  1. 19
      components/tab-bar/postList.vue

19
components/tab-bar/postList.vue

@ -120,6 +120,10 @@
></uni-icons> ></uni-icons>
<text>{{item.xiangyao}}</text> <text>{{item.xiangyao}}</text>
</view> </view>
<view class="browse-count">
<uni-icons type="eye" size="18" color="#a5aeab"></uni-icons>
<text>{{item.browseCount}}</text>
</view>
</view> </view>
</view> </view>
</view> </view>
@ -208,7 +212,7 @@
imageKey: 'graduation', imageKey: 'graduation',
action: 'mine' action: 'mine'
}], }],
baseCategories: ['推荐', '最新'], baseCategories: ['推荐', '最新', '热门'],
categoryList: [], categoryList: [],
goodsList: [], goodsList: [],
pageNum: 1, pageNum: 1,
@ -518,7 +522,7 @@
const category = this.categories[this.categoryIndex] const category = this.categories[this.categoryIndex]
const categoryItem = this.categoryList.find(item => item.name == category) const categoryItem = this.categoryList.find(item => item.name == category)
const area = this.getArea() 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 = { const query = {
pageNum: this.pageNum, pageNum: this.pageNum,
pageSize: this.pageSize, pageSize: this.pageSize,
@ -553,6 +557,7 @@
price: isWant ? (item.expectedPrice || 0) : (item.price || 0), price: isWant ? (item.expectedPrice || 0) : (item.price || 0),
originalPrice: item.originPrice, originalPrice: item.originPrice,
xiangyao: item.likeCount || 0, xiangyao: item.likeCount || 0,
browseCount: item.browseCount || 0,
distance: item.distance || '本校', distance: item.distance || '本校',
icon: item.userAvatar || '/static/images/img/songshu.png', icon: item.userAvatar || '/static/images/img/songshu.png',
shopName: item.userName || '校园同学', shopName: item.userName || '校园同学',
@ -985,6 +990,7 @@
} }
.category-row { .category-row {
margin-top: -15rpx;
height: 80rpx; height: 80rpx;
display: flex; display: flex;
align-items: center; align-items: center;
@ -1193,6 +1199,15 @@
font-size: 17rpx; font-size: 17rpx;
} }
.browse-count {
margin-left: 10rpx;
display: flex;
align-items: center;
gap: 3rpx;
color: #a1aaa6;
font-size: 17rpx;
}
.page-like-effect { .page-like-effect {
position: fixed; position: fixed;
top: 0; top: 0;

Loading…
Cancel
Save