index.wxml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <!--pages/goods/category/index.wxml-->
  2. <n-spin spinning="{{loading}}">
  3. <view class="page-wrap">
  4. <t-navbar title="{{pageTitle}}" leftIcon="chevron-left" homeIcon="search" bind:go-back="onGoBack" bind:go-home="onGoSearch" t-class-left-icon="left-icon-back" t-class-home-icon="home-icon" t-class-title="nav-title" />
  5. <view class="scroll-wrap">
  6. <n-sidebar class="sidebar-scroll" active="{{active}}" scrollMaxHeight="{{scrollMaxHeight}}" bindchange="onSidebarChange">
  7. <n-sidebar-item wx:for="{{data}}" wx:key="index" title="{{item.label}}" borderColor="#555" />
  8. </n-sidebar>
  9. <scroll-view scroll-y class="itembar-scroll" style="height: {{scrollMaxHeight}}px;">
  10. <view class="px-3 pt-3" wx:if="{{advs && advs.length > 0}}">
  11. <view style="grid-template-columns: repeat(1, 100%); gap: 30rpx; display: grid;">
  12. <block wx:for="{{advs}}" wx:key="index">
  13. <template is="showadv" data="{{...item}}" />
  14. </block>
  15. </view>
  16. </view>
  17. <view class="px-3 pt-3">
  18. <view class="n-grid n-grid-col-{{columnSize}}">
  19. <block wx:for="{{albums}}" wx:key="index">
  20. <template is="showimage" data="{{...item, columnSize, isText}}" />
  21. </block>
  22. </view>
  23. </view>
  24. <view style="height: 200rpx;" />
  25. </scroll-view>
  26. </view>
  27. </view>
  28. </n-spin>
  29. <template name="showadv">
  30. <view>
  31. <t-image t-class="w-100 clear" src="{{image}}" mode="widthFix" data-tagid="{{value}}" bindtap="gotoAdvtag" />
  32. </view>
  33. </template>
  34. <template name="showimage">
  35. <view>
  36. <t-image t-class="w-100 clear" src="{{image}}" mode="widthFix" data-value="{{value}}" bindtap="gotoDetail" />
  37. <view wx:if="{{isText}}" class="text-center text-sm gray-1">{{label}}</view>
  38. </view>
  39. </template>