index.wxml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <view class="search_container">
  2. <view class="inputContent">
  3. <van-icon name="search" />
  4. <input type="text" bindinput="onInput" bindconfirm="onInput" placeholder="搜索商品名称" />
  5. <button bindtap="onSearch" bintap="onSearch">搜索</button>
  6. </view>
  7. <view class="show_clear" hidden="true">
  8. <text>搜索历史</text>
  9. <view>
  10. <van-icon name="delete-o" />
  11. <text>清除记录</text>
  12. </view>
  13. </view>
  14. <view class="search_content_true" wx:if="{{show}}">
  15. <image src="./img/kong.png"></image>
  16. </view>
  17. <view wx:else>
  18. <view class="search_content_false" wx:for="{{showList}}" wx:key="*this" >
  19. <van-row>
  20. <van-col span="7" offset="1">
  21. <view class="pic">
  22. <image src="{{item.foodsImg}}"></image>
  23. </view>
  24. </van-col>
  25. <van-col span="8">
  26. <view class="desc">
  27. <text style="font-size:33rpx;font-weight:700;">{{item.foodsName}}</text>
  28. <text style="font-size: 24rpx;color:rgb(173, 173, 173);">{{item.foodsDesc}}</text>
  29. <text style="text-decoration: line-through;">¥{{item.initPrice}}</text>
  30. <text style="color:red;font-size: 30rpx;">¥{{item.nowPrice}}+40积分</text>
  31. </view>
  32. </van-col>
  33. <van-col span="8">
  34. <van-stepper disable-input="true" data-id="{{item.id}}" style="position: relative;top:180rpx;right:-20rpx;" min="0" value="{{ item.num }}" bind:change="onChange" bind:plus="onPlus" bind:minus="onMinus" />
  35. </van-col>
  36. </van-row>
  37. </view>
  38. <!-- 分割 -->
  39. <view style="height: 80rpx;width: 100%;"></view>
  40. <!-- 结算 -->
  41. <view class="search_total" >
  42. <van-submit-bar price="{{ totalPrice*100 }}" button-text="去结算" bind:submit="onSubmit" />
  43. </view>
  44. </view>
  45. </view>