|
|
@ -1,10 +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 style="position: fixed; top: 0; left: 0; right: 0; padding: 20rpx; background-color: white; z-index: 100; box-shadow: 0 2rpx 10rpx rgba(0,0,0,0.1); box-sizing: border-box;"> |
|
|
<view class="search-bar-container"> |
|
|
<view style="width: 90%; display: flex; border: 1rpx solid #ddd; border-radius: 40rpx; overflow: hidden; margin: 0 auto;"> |
|
|
<view class="search-box"> |
|
|
|
|
|
<image class="search-icon" src="/images/logo.svg" mode="aspectFit"></image> |
|
|
<input |
|
|
<input |
|
|
style="width: 100%; padding: 20rpx 30rpx;" |
|
|
class="search-input" |
|
|
placeholder="搜索商品名称或品种" |
|
|
placeholder="搜索商品名称或品种" |
|
|
bindinput="onSearchInput" |
|
|
bindinput="onSearchInput" |
|
|
bindconfirm="searchGoods" |
|
|
bindconfirm="searchGoods" |
|
|
@ -14,7 +15,7 @@ |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<!-- 商品列表 --> |
|
|
<!-- 商品列表 --> |
|
|
<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 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 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;"> |
|
|
|