You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
62 lines
2.7 KiB
62 lines
2.7 KiB
<view class="secondhand-container">
|
|
<!-- 顶部搜索栏 -->
|
|
<view class="search-container">
|
|
<view class="search-box">
|
|
<!-- 雷雨田2025.8.30添加 -->
|
|
<image class="search-icon" src="/images/new_search.png" style="width: 62rpx; display: block; box-sizing: border-box; height: 60rpx"></image>
|
|
<input class="search-input" placeholder="搜索二手商品" confirm-type="search" bindconfirm="searchGoods" />
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 分类导航 -->
|
|
<scroll-view scroll-x class="category-scroll">
|
|
<view class="category-list">
|
|
<view class="category-item {{currentCategory === 'all' ? 'active' : ''}}" bindtap="switchCategory" data-category="all">
|
|
全部
|
|
</view>
|
|
<view class="category-item {{currentCategory === 'electronics' ? 'active' : ''}}" bindtap="switchCategory" data-category="electronics">
|
|
电子产品
|
|
</view>
|
|
<view class="category-item {{currentCategory === 'books' ? 'active' : ''}}" bindtap="switchCategory" data-category="books">
|
|
书籍教材
|
|
</view>
|
|
<view class="category-item {{currentCategory === 'daily' ? 'active' : ''}}" bindtap="switchCategory" data-category="daily">
|
|
日用品
|
|
</view>
|
|
<view class="category-item {{currentCategory === 'clothes' ? 'active' : ''}}" bindtap="switchCategory" data-category="clothes">
|
|
衣物服饰
|
|
</view>
|
|
<view class="category-item {{currentCategory === 'others' ? 'active' : ''}}" bindtap="switchCategory" data-category="others">
|
|
其他
|
|
</view>
|
|
</view>
|
|
</scroll-view>
|
|
|
|
<!-- 商品列表 -->
|
|
<scroll-view scroll-y class="goods-container" bindscrolltolower="loadMore">
|
|
<view class="goods-list">
|
|
<view class="goods-item" wx:for="{{goodsList}}" wx:key="id" bindtap="navigateToDetail" data-id="{{item.id}}">
|
|
<image class="goods-image" src="{{item.images[0]}}" mode="aspectFill"></image>
|
|
<view class="goods-info">
|
|
<view class="goods-title">{{item.title}}</view>
|
|
<view class="goods-price">¥{{item.price}}</view>
|
|
<view class="goods-meta">
|
|
<text class="goods-time">{{item.publishTime}}</text>
|
|
<text class="goods-condition">{{item.condition}}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 加载更多 -->
|
|
<view class="loading-more" wx:if="{{hasMoreGoods}}">
|
|
<text>加载中...</text>
|
|
</view>
|
|
<view class="no-more" wx:if="{{!hasMoreGoods && goodsList.length > 0}}">
|
|
<text>没有更多商品了</text>
|
|
</view>
|
|
</scroll-view>
|
|
|
|
<!-- 发布按钮 -->
|
|
<view class="publish-btn" bindtap="navigateToPublish" style="height: 118rpx; display: flex; box-sizing: border-box; left: 604rpx; top: 1047rpx; width: 118rpx; position: fixed">+</view>
|
|
</view> |