index.wxml 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <!--index.wxml-->
  2. <!--pages/home/home.wxml-->
  3. <!-- <navbar back="{{false}}" title="{{company.companyName}}"></navbar> -->
  4. <block wx:if="{{!userInfo || !userInfo.userId}}">
  5. <swiper class="swiperNo" indicator-dots autoplay>
  6. <swiper-item wx:for="{{banner}}" wx:key="id">
  7. <image src="{{item}}" mode="widthFix"></image>
  8. </swiper-item>
  9. </swiper>
  10. <view class="businessTitle" wx:if="{{businessList.length > 0}}">OUR BUSINESS</view>
  11. <view class="business">
  12. <view class="businessItem" wx:for="{{businessList}}" wx:key="id">
  13. <image src="{{item.img}}" mode="aspectFit" />
  14. <view class="businessText">{{item.text}}</view>
  15. </view>
  16. </view>
  17. <view class="businessTitle businessTitle1" wx:if="{{contact.img}}">CONTACT US</view>
  18. <view class="contact" style="background: url({{contact.img}});background-size: 100%; background-repeat: no-repeat;" mode="aspectFill">{{contact.text}}</view>
  19. <navigator url="/pages/login/login" hover-class="none" class="login">LOG IN</navigator>
  20. <view style="height: 140rpx;"></view>
  21. </block>
  22. <block wx:else="">
  23. <view class="custom {{scrollTop > 0 ?'customBg':''}}" style="padding-top:{{topBarHeight}}px">
  24. <!-- <icon class="icon-small" type="search" size="30rpx"></icon> -->
  25. <!-- <view>啊实打实大师大</view> -->
  26. <image src="{{company.companyLogo}}" mode="heightFix" style="height: 60rpx;"></image>
  27. </view>
  28. <view class="page">
  29. <view wx:if="{{banner.length > 0}}">
  30. <swiper class="swiper" indicator-dots autoplay>
  31. <swiper-item wx:for="{{banner}}" wx:key="id">
  32. <image src="{{item}}" mode="widthFix"></image>
  33. </swiper-item>
  34. </swiper>
  35. </view>
  36. <navigator open-type="navigate" url="/pages/search/search" class="search">
  37. <input confirm-type="search" placeholder="搜索:产品名称/SKU/69码" />
  38. <icon class="icon-small" type="search" size="40rpx"></icon>
  39. </navigator>
  40. <swiper style="height: {{menuList[0] && menuList[0].length <= 5 ? '180rpx' : '300rpx'}};" indicator-dots>
  41. <swiper-item class="menu" wx:for="{{menuList}}" wx:for-item="itemList" wx:key="index">
  42. <!-- <view class="menu-item" bind:tap="onMenu">
  43. <image src="/images/5.png"></image>
  44. <view class="text text1">全部商品</view>
  45. </view> -->
  46. <view class="menu-item" wx:for="{{itemList}}" wx:key="id" data-item="{{item}}" bind:tap="onMenu">
  47. <image src="{{item.pic || '/images/menu.png'}}"></image>
  48. <view class="text text1">{{item.categoryName}}</view>
  49. </view>
  50. </swiper-item>
  51. </swiper>
  52. <view>
  53. <view class="floorTitle">正品好物推荐</view>
  54. <view class="goodsPanel">
  55. <view class="goodsQuery">
  56. <view class="queryItem iconfont shaixuan zonghe {{query.all ? 'ups' : ''}}" style="content: none !important;" data-param="" bind:tap="query">综合</view>
  57. <view class="queryItem bxdfont xiaoliang {{query.salesSort == false ? 'downs' : query.salesSort == true ? 'ups' : ''}}" data-param="salesSort" bind:tap="query">销量</view>
  58. <view class="queryItem bxdfont xiaoliang {{query.newProductSort == false ? 'downs' : query.newProductSort == true ? 'ups' : ''}}" data-param="newProductSort" bind:tap="query">新品</view>
  59. <view class="queryItem bxdfont xiaoliang {{query.priceSort == false ? 'downs' : query.priceSort == true ? 'ups' : ''}}" data-param="priceSort" bind:tap="query">价格</view>
  60. <view class="queryItem iconfont shaixuan {{query.shaixuan ? 'ups' : ''}}" bind:tap="shaixuan">筛选</view>
  61. </view>
  62. <view class="goodsList" style="clear: both;">
  63. <navigator url="/pages/goods/goods?prodId={{item.prodId}}" class="goods" wx:for="{{goodsList}}" wx:key="goodsId">
  64. <image src="{{item.picText}}"></image>
  65. <view class="name text2">{{item.prodName}}</view>
  66. <view class="bar">
  67. <view class="price">¥{{item.price}}</view>
  68. <view style="font-weight: 400;font-size: 18rpx;color: #A2A2A2;line-height: 40rpx;">
  69. <text>可供{{item.usableStocksTotal}}{{item.stockUnit || '件 '}}</text>
  70. <text wx:if="{{item.limitQty}}"> 限购数量{{item.limitQty}}{{item.stockUnit || '件'}}</text>
  71. </view>
  72. <!-- <navigator url="/pages/goods/goods?prodId={{item.prodId}}" hover-class="none" class="iconfont icon-shouyegouwuche icon"></navigator> -->
  73. </view>
  74. </navigator>
  75. <!-- <view class="goods" style="height: 200rpx;">
  76. </view> -->
  77. </view>
  78. </view>
  79. </view>
  80. <!-- <view style="height: 200rpx;"></view> -->
  81. <view class="goods" style="height: 200rpx;text-align: center;width: 100%;">
  82. <view wx:if="{{loadding}}" class="iconfont icon-loadding"></view>
  83. <view wx:elif="{{pages == null && goodsList.length == 0}}">
  84. <image class="listEmpty" src="/images/list-empty.png"></image>
  85. <view class="loadMore" style="margin-top: 20rpx;">啥记录也没有!</view>
  86. </view>
  87. <view wx:elif="{{current < pages}}" class="loadMore" catch:tap="getGoodsList">点击加载更多</view>
  88. <view wx:else="" class="noMore">--我也是有底线的--</view>
  89. </view>
  90. </view>
  91. <view class="dialogBg" bindtap="powerDrawer" wx:if="{{showDialog}}" catchtouchmove="stopScroll"></view>
  92. <view animation="{{animationData}}" class="drawer_attr_box" wx:if="{{showDialog}}">
  93. <view class="iconfont icon-guanbi" bindtap="powerDrawer"></view>
  94. <view class="draw_attr_title">全部条件</view>
  95. <view class="drawer_content" style="display: flex;flex-flow: column;max-height: 1000rpx;">
  96. <form class="shaixuanBox" catchsubmit="submitShaixuan" bindreset="submitShaixuanReset">
  97. <view class="shaixuanBoxTitle" wx:if="{{brandList.length > 0 }}">品牌:</view>
  98. <view class="shaixuanBoxBrand" wx:if="{{brandList.length > 0 }}">
  99. <view wx:for="{{brandList}}" wx:key="id" class="text1 {{item.check?'active':''}}" data-index="{{index}}" bind:tap="onBrand">{{item.name}}</view>
  100. </view>
  101. <view class="shaixuanBoxTitle">价格区间:</view>
  102. <view class="shaixuanBoxPrice">
  103. <input name="startPrice" value="{{query.startPrice}}" placeholder="0" />
  104. <input name="endPrice" value="{{query.endPrice}}" placeholder="100" />
  105. </view>
  106. <view class="shaixuanBoxBtn">
  107. <button form-type="reset">清空</button>
  108. <button form-type="submit">确定</button>
  109. </view>
  110. </form>
  111. </view>
  112. </view>
  113. </block>
  114. <tabbar></tabbar>