|
|
@ -1,12 +1,11 @@ |
|
|
<view class="container" style="align-items: flex-start; padding: 20rpx; width: 100%; max-width: 100vw; overflow-x: hidden; position: relative; box-sizing: border-box;"> |
|
|
<view class="container" style="align-items: flex-start; padding: 20rpx; width: 100%; max-width: 100vw; overflow-x: hidden; position: relative; box-sizing: border-box;"> |
|
|
|
|
|
|
|
|
<!-- 搜索框 --> |
|
|
<!-- 搜索框 --> |
|
|
<view class="search-bar-container"> |
|
|
<view class="search-bar"> |
|
|
<view class="search-box"> |
|
|
<view class="search-container"> |
|
|
<image class="search-icon" src="/images/logo.svg" mode="aspectFit"></image> |
|
|
<view class="search-icon">🔍</view> |
|
|
<input |
|
|
<input |
|
|
class="search-input" |
|
|
class="search-input" |
|
|
placeholder="搜索商品名称或品种" |
|
|
placeholder="输入商品名称或品种" |
|
|
bindinput="onSearchInput" |
|
|
bindinput="onSearchInput" |
|
|
bindconfirm="searchGoods" |
|
|
bindconfirm="searchGoods" |
|
|
value="{{searchKeyword}}" |
|
|
value="{{searchKeyword}}" |
|
|
@ -15,7 +14,7 @@ |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<!-- 商品列表 --> |
|
|
<!-- 商品列表 --> |
|
|
<view class="goods-list" style="width: 100%; display: flex; flex-direction: column; align-items: flex-start; min-height: 400rpx; margin-top: 160rpx;" bindscrolltolower="onReachBottom" bindscroll="onScroll"> |
|
|
<view class="goods-list" style="width: 100%; display: flex; flex-direction: column; align-items: flex-start; min-height: 400rpx; margin-top: 120rpx;" bindscrolltolower="onReachBottom" bindscroll="onScroll"> |
|
|
<view wx:if="{{filteredGoods.length > 0}}" wx:for="{{filteredGoods}}" wx:key="id" wx:for-item="item" wx:for-index="index" class="card" style="width: 100%; margin-top: 0; margin-bottom: 20rpx;"> |
|
|
<view wx:if="{{filteredGoods.length > 0}}" wx:for="{{filteredGoods}}" wx:key="id" wx:for-item="item" wx:for-index="index" class="card" style="width: 100%; margin-top: 0; margin-bottom: 20rpx;"> |
|
|
<!-- 图片和信息1:1比例并排显示 --> |
|
|
<!-- 图片和信息1:1比例并排显示 --> |
|
|
<view style="display: flex; width: 100%; border-radius: 8rpx; overflow: hidden; background-color: #f5f5f5;"> |
|
|
<view style="display: flex; width: 100%; border-radius: 8rpx; overflow: hidden; background-color: #f5f5f5;"> |
|
|
|