| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <!--pages/search/search.wxml-->
- <view class="search">
- <input placeholder="请输入产品名称" value="{{picTitle}}" data-name="picTitle" bindconfirm="searchGoods" bindinput="asyncValue" />
- <icon class="icon-small" type="search" size="40rpx"></icon>
- <view wx:if="{{goodsList.length == 0}}" class="text" bind:tap="searchGoods">搜索</view>
- <view wx:else="" class="text" bind:tap="cancelSearch">取消</view>
- </view>
- <block wx:if="{{goodsList.length == 0}}">
- <view class="history">
- <view>搜索记录</view>
- <view bind:tap="delHistory">
- <view class="iconfont icon-shanchu" style="display: inline-block;"></view>清空记录
- </view>
- </view>
- <view class="searchBtn">
- <view class="searchBtnItem" wx:for="{{searchKeys}}" wx:for-index="index" wx:key="index" data-index="{{index}}" data-name1="{{item}}" bind:tap="searchGoods">{{item}}</view>
- </view>
- </block>
- <view class="goodsList">
- <navigator url="/pages/goods/goods?prodId={{item.prodId}}" class="goods" wx:for="{{goodsList}}" wx:key="goodsId">
- <image src="{{item.picText || '/images/empty.png'}}"></image>
- <view class="goodsInfo">
- <view class="name text2">{{item.prodName}}</view>
- <view class="brief text3">{{item.simpleTitle}}</view>
- <view class="bar">
- <view class="price">¥{{item.price}}</view>
- <!-- <view class="iconfont icon-lujing icon"></view> -->
- <view style="font-weight: 400;font-size: 18rpx;color: #A2A2A2;line-height: 40rpx;">
- <text>可供{{item.totalStocks}}{{item.stockUnit || '件 '}}</text>
- <text wx:if="{{item.limitQty}}"> 限购数量{{item.limitQty}}{{item.stockUnit || '件'}}</text>
- </view>
- </view>
- </view>
- </navigator>
- <view class="goods" wx:if="{{loading}}">
- <view wx:if="{{loadding}}" class="iconfont icon-loadding"></view>
- <view wx:if="{{searchKeys.length == 0}}">
- <image class="listEmpty" src="/images/list-empty.png"></image>
- <view class="loadMore" style="margin-top: 20rpx;">啥记录也没有!</view>
- </view>
- <view wx:elif="{{pages == null && goodsList.length == 0}}">
- <image class="listEmpty" src="/images/list-empty.png"></image>
- <view class="loadMore" style="margin-top: 20rpx;">搜不到诶,换个词试试呗?</view>
- </view>
- <view wx:elif="{{current < pages}}" class="loadMore" catch:tap="getGoodsList">点击加载更多</view>
- <view wx:else="" class="noMore">--我也是有底线的--</view>
- </view>
- <view class="goods" wx:else>
- <view wx:if="{{searchKeys.length == 0}}">
- <image class="listEmpty" src="/images/list-empty.png"></image>
- <view class="loadMore" style="margin-top: 20rpx;">啥记录也没有!</view>
- </view>
- </view>
- </view>
|