index.wxml 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <view class="container">
  2. <!-- 轮播图 -->
  3. <swiper class="swiper" indicator-dots autoplay circular interval="3000" duration="1000">
  4. <swiper-item wx:for="{{ banner }}" wx:key="id">
  5. <navigator hover-class="none" url="{{ item.link }}">
  6. <image src="{{ item.url }}" />
  7. </navigator>
  8. </swiper-item>
  9. </swiper>
  10. <!-- welfare -->
  11. <view class="welfare acea-row row-evenly">
  12. <view class="item acea-row row-middle">
  13. <image src="/static/images/index_shangcheng.png" />
  14. <text>官方商城</text>
  15. </view>
  16. <view class="item acea-row row-middle">
  17. <image src="/static/images/index_zhengpin.png" />
  18. <text>正品保证</text>
  19. </view>
  20. </view>
  21. <!-- 商品类目 -->
  22. <view class="category jhx_bg0 acea-row row-between">
  23. <view class="item" wx:for="{{ channel }}" wx:key="id" data-id="{{ item.id }}" bindtap="toCatelog">
  24. <image src="{{ item.iconUrl }}" />
  25. <view>{{ item.name }}</view>
  26. </view>
  27. </view>
  28. <!-- 商品 -->
  29. <view class="goods">
  30. <scroll-view class="scroll category-scroll" scroll-x>
  31. <view class="item {{ categoryId == item.id ? 'active' : '' }}" wx:for="{{ category }}" wx:key="id" bindtap="changeCategory" data-id="{{ item.id }}">{{ item.name }}</view>
  32. </scroll-view>
  33. <view class="list acea-row row-between">
  34. <view class="item jhx_bg0" wx:for="{{ floorGoods }}" wx:key="id" data-item="{{ item }}" bindtap="toDetail">
  35. <image src="{{ item.picUrl[0] }}" />
  36. <view class="title line1 line2">{{ item.name }}</view>
  37. <view class="label {{ item.labelName ? '' : 'block' }}">{{ item.labelName }}</view>
  38. <view class="price"><text>¥</text>{{ item.retailPrice }}</view>
  39. </view>
  40. </view>
  41. <van-empty wx:if="{{ !floorGoods.length }}" image="/static/images/empty_goods.png" description="没有相关商品" />
  42. <view wx:else hidden="{{ totalPages > page }}" class="no-more">— 没有更多了 —</view>
  43. </view>
  44. <popup custom-class="user-popup" show="{{ show }}" closeable catchtouchmove="prevent" bind:close="hidePopup">
  45. <view class="title">维护身份信息</view>
  46. <van-field label="姓名" value="{{ nickname }}" border="{{ false }}" clearable placeholder="请输入姓名" bind:input="nameInput" />
  47. <van-field label="手机号" value="{{ mobile }}" border="{{ false }}" clearable placeholder="请输入手机号" bind:input="mobileInput" />
  48. <view class="btn-group">
  49. <view class="btn" bindtap="hidePopup">取消</view>
  50. <view class="btn" bindtap="updateUser">提交</view>
  51. </view>
  52. </popup>
  53. </view>