goodsDetail.wxml 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <!-- 轮播 -->
  2. <view class="page-section">
  3. <swiper
  4. indicator-dots="{{true}}"
  5. indicator-color="rgba(130, 130, 130, 1)"
  6. indicator-active-color="#FFF"
  7. autoplay="{{false}}">
  8. <block wx:for="{{background}}" wx:key="*this">
  9. <swiper-item>
  10. <view class="swiper-item {{item}}">
  11. <image src=""></image>
  12. </view>
  13. </swiper-item>
  14. </block>
  15. </swiper>
  16. </view>
  17. <view class="main-information">
  18. <view class="tag-list">
  19. <text>蔬菜</text>
  20. </view>
  21. <text
  22. class="name"
  23. user-select>名字</text>
  24. <view class="unit-price">
  25. <text class="price">¥23.00</text>
  26. <text class="unit">/ kg</text>
  27. </view>
  28. </view>
  29. <view class="nav-wrap">
  30. <view
  31. class="{{currentNav === item.value ? 'active' : ''}}"
  32. wx:for="{{nav}}"
  33. wx:key="value"
  34. data-item="{{item}}"
  35. bind:tap="handleNav">{{item.name}}
  36. </view>
  37. </view>
  38. <!--描述-->
  39. <view
  40. class="business-info"
  41. hidden="{{currentNav === '2'}}">
  42. <text class="introduce" user-select>一段描述</text>
  43. <block wx:if="{{false}}">
  44. <view class="subtitle">预计上架时间</view>
  45. <view class="date">2022年09月10日</view>
  46. </block>
  47. <block wx:if="{{true}}">
  48. <view class="subtitle">相关产品</view>
  49. <scroll-view
  50. class="goods-scroll"
  51. scroll-x>
  52. <view
  53. class="item"
  54. wx:for="{{[1, 2, 3, 4]}}"
  55. wx:key="item">
  56. <view>
  57. <view class="photo">
  58. <image src=""></image>
  59. </view>
  60. <view class="info">
  61. <text
  62. class="name">名字名字名字名字名字名字名字名字</text>
  63. <view class="unit-price">
  64. <text class="price">¥23.00</text>
  65. <text class="unit">/ kg</text>
  66. </view>
  67. </view>
  68. </view>
  69. </view>
  70. </scroll-view>
  71. </block>
  72. </view>
  73. <!-- todo 供应商-->
  74. <view
  75. class="business-info"
  76. hidden="{{currentNav === '1'}}">
  77. 供应商
  78. </view>
  79. <view
  80. class="fixed-bottom"
  81. hidden="{{currentNav === '2'}}">
  82. <view>
  83. <button
  84. class="btn-collection"
  85. type="primary"
  86. wx:if="{{false}}">收藏预售产品
  87. </button>
  88. <block wx:if="{{true}}">
  89. <button
  90. class="btn-collection"
  91. type="primary">添加购物车
  92. </button>
  93. <button
  94. class="btn-collection"
  95. type="primary">添加收藏夹
  96. </button>
  97. </block>
  98. </view>
  99. </view>