search.wxml 1.3 KB
<view class="input_box searchbox ">
    <icon class="iconfont" size="13" type="search"></icon>
    <input autoFocus bindconfirm="keywordSearch" bindinput="bindKeywordInput" confirmType="search" placeholder="搜索美食、家居和配饰" placeholderClass="place" type="text" value="{{keyword}}"></input>
    <view class="searchbtn">
        <text bindtap="keywordSearch" wx:if="{{keyword}}">搜索</text>
        <text bindtap="cancel" wx:else>取消</text>
    </view>
</view>
<view wx:if="{{searchSongList.length==0}}"></view>
<scroll-view bindscrolltolower="searchScrollLower" class="searchResult" scrollY="true" wx:else>
    <view class="goodsList">
        <view class="waterfall">
            <view class="goods_box" data-data="{{item}}" wx:for="{{searchSongList}}" wx:key="{{item.id}}">
                <navigator url="../goodsdetail/goodsdetail?id={{item.id}}">
                    <image mode="widthFix" src="{{item.thumb}}"></image>
                </navigator>
                <view bindtap="gogoods" class="goods_name">{{item.name}}</view>
                <view>
                    <text class="price">¥{{item.pprice}}</text>
                    <text class="old_price">¥{{item.oprice}}</text>
                </view>
            </view>
        </view>
    </view>
</scroll-view>