index.wxml 4.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <import src='../../templates/homecate.wxml' />
  2. <!--index.wxml-->
  3. <scroll-view class="page-wrap" scroll-y lower-threshold="{{100}}" bindscrolltolower="handleReachBottom">
  4. <view wx:if="{{loading}}">
  5. <t-loading t-class="page-loading" theme="circular" size="40rpx" loading t-class-indicator="t-class-indicator">
  6. <span slot="text" class="loading-text">加载中...</span>
  7. </t-loading>
  8. </view>
  9. <view wx:if="{{successload===2}}" class="reloadblock pb-5">
  10. <t-button bindtap="load">重新加载页面</t-button>
  11. </view>
  12. <view wx:else class="page-content">
  13. <view class="emptyblock {{ successload === 0 ? 'wait' : successload === 1 ? (!homeCarousels || homeCarousels.length === 0) ? 'nocontent' : '' : ''}}">
  14. <n-swipescreen width="{{swipewidth}}" height="{{swipeHeight}}" class="{{movecls}}">
  15. <n-swipescreen-item wx:for="{{homeCarousels}}" wx:key="index">
  16. <t-image id="nx{{index}}" src="{{item.wxImageUrl}}" t-class="timgcasourel" wx:key="index" />
  17. <button class="movefloatbtn" style="background-image: url({{item.wxButtonUrl}});" data-tagid="{{item.tagId}}" catchtap="gotoAdvtag" />
  18. </n-swipescreen-item>
  19. <view slot="pointer" class="movecenter">
  20. <t-button icon="chevron-down" t-class="movebtn" catchtap="onMoveSize" />
  21. </view>
  22. </n-swipescreen>
  23. </view>
  24. <block wx:if="{{homeCategories && homeCategories.length > 0}}">
  25. <template is="catewrap" wx:for="{{homeCategories}}" data="{{...item, rowdx: index+1}}" wx:key="index" />
  26. </block>
  27. <!-- 线下相册 -->
  28. <!-- <view class="mt-5 pb-5" style="padding: 0 39rpx;">
  29. <view class="pb-4">
  30. <image lazy-load src="/assets/home/t3.png" style="width:672rpx;height:28rpx" mode="aspectFit" />
  31. </view>
  32. <view class="emptyblock {{!homeActives || homeActives.length === 0? 'nocontent' : ''}}">
  33. <view class="d-flex pb-2">
  34. <t-swiper class="flex-1" height="234rpx" autoplay="{{true}}" duration="{{duration}}" interval="{{interval}}">
  35. <t-swiper-item wx:for="{{homeActives}}" wx:key="index">
  36. <t-image t-class="timgactive" shape="round" src="{{item.imageUrl}}" data-id="{{item.id}}" mode="aspectFill" catchtap="gotoAlbum" />
  37. </t-swiper-item>
  38. </t-swiper>
  39. </view>
  40. </view>
  41. </view> -->
  42. <!-- 线下活动 -->
  43. <view class="mt-5 pb-5" style="padding: 0 39rpx;">
  44. <view class="pb-4">
  45. <image lazy-load src="/assets/home/t3.png" style="width:672rpx;height:28rpx" mode="aspectFit" />
  46. </view>
  47. <view class="emptyblock {{!homeActives || homeActives.length === 0? 'nocontent' : ''}}">
  48. <view class="d-flex pb-2">
  49. <t-swiper class="flex-1" height="234rpx" autoplay="{{true}}" duration="{{duration}}" interval="{{interval}}">
  50. <t-swiper-item wx:for="{{homeActives}}" wx:key="index">
  51. <t-image t-class="timgactive" shape="round" src="{{item.imageUrl}}" data-id="{{item.id}}" data-mode="{{item.mode}}" data-link="{{item.link}}" mode="aspectFill" catchtap="gotoLink" />
  52. </t-swiper-item>
  53. </t-swiper>
  54. </view>
  55. </view>
  56. </view>
  57. <view wx:if="{{albums && albums.length > 0}}">
  58. <view style="padding: 0 39rpx;">
  59. <view class="pb-4 text-center text-bold">
  60. 为您推荐
  61. </view>
  62. </view>
  63. <view class="px-3">
  64. <n-goods-list wx:if="{{albums && albums.length > 0}}" items="{{albums}}" bind:click="gotoGoodsDetail" />
  65. <t-empty wx:else icon="chart-bubble" description="暂无相关内容" t-class="mt-7" />
  66. </view>
  67. <n-load-more wx:if="{{albums && albums.length > 0}}" status="{{loadMoreStatus}}" no-more-text="没有更多了" />
  68. </view>
  69. </view>
  70. </scroll-view>
  71. <template name="catewrap">
  72. <view class="mt-5" style="padding: 0 39rpx;">
  73. <view class="pb-4">
  74. <image lazy-load src="{{imageUrl}}" style="width:672rpx;height:28rpx" mode="aspectFit" />
  75. </view>
  76. <scroll-view scroll-x style="white-space: nowrap;">
  77. <view class="d-flex pb-2" style="column-gap: 20rpx;">
  78. <view wx:for="{{items}}" wx:for-item="item" wx:key="index">
  79. <t-image shape="round" t-class="timg{{rowdx}}" src="{{item.imageUrl}}" data-id="{{item.id}}" bindtap="gotolist" />
  80. </view>
  81. </view>
  82. </scroll-view>
  83. </view>
  84. </template>