goodsDetail.wxml 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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
  9. wx:for="{{objProductDetail.product_rotation_img_list}}"
  10. wx:key="index">
  11. <swiper-item
  12. data-index="{{index}}"
  13. data-imgs="{{objProductDetail.product_rotation_img_list}}"
  14. bind:tap="handlePreviewImage">
  15. <view class="swiper-item">
  16. <image
  17. mode="widthFix"
  18. src="{{item}}"></image>
  19. </view>
  20. </swiper-item>
  21. </block>
  22. </swiper>
  23. </view>
  24. <view class="main-information">
  25. <view class="tag-list">
  26. <text>{{objProductDetail.product_category_name}}</text>
  27. </view>
  28. <text
  29. class="name"
  30. user-select>{{objProductDetail.product_title}}</text>
  31. <view class="unit-price">
  32. <text class="price">¥{{tools.fen2Yuan(objProductDetail.product_all_price)}}</text>
  33. <text class="unit">/ {{objProductDetail.product_unit}}</text>
  34. </view>
  35. </view>
  36. <customer-tab
  37. nav="{{nav}}"
  38. active="{{active}}"
  39. bind:change="handleNav"/>
  40. <!--描述-->
  41. <view
  42. class="goods-info"
  43. hidden="{{active === '2'}}">
  44. <text class="introduce" user-select>{{objProductDetail.product_desc}}</text>
  45. <block>
  46. <view class="subtitle">货号</view>
  47. <view
  48. class="date">{{objProductDetail.product_code}}
  49. </view>
  50. </block>
  51. <block>
  52. <view class="subtitle">规格</view>
  53. <view
  54. class="date">{{objProductDetail.product_spec}}
  55. </view>
  56. </block>
  57. <block>
  58. <view class="subtitle">{{objProductDetail.product_sale_at === 0 ? '预计' : ''}}上架时间</view>
  59. <view
  60. class="date">
  61. {{objProductDetail.product_sale_at === 0 ? '预售' : tools.formatTs(objProductDetail.product_sale_at * 1000, 'YYYY-MM-DD hh:mm')}}
  62. </view>
  63. </block>
  64. <block>
  65. <view class="subtitle">库存</view>
  66. <view
  67. class="date">{{objProductDetail.product_count}} {{objProductDetail.product_unit}}
  68. </view>
  69. </block>
  70. <!-- 暂时不做 -->
  71. <block wx:if="{{false}}">
  72. <view class="subtitle">相关产品</view>
  73. <scroll-view
  74. class="goods-scroll"
  75. scroll-x>
  76. <view
  77. class="item"
  78. wx:for="{{[1, 2, 3, 4]}}"
  79. wx:key="item">
  80. <view>
  81. <view class="photo">
  82. <image src=""></image>
  83. </view>
  84. <view class="info">
  85. <text
  86. class="name">名字名字名字名字名字名字名字名字</text>
  87. <view class="unit-price">
  88. <text class="price">¥23.00</text>
  89. <text class="unit">/ kg</text>
  90. </view>
  91. </view>
  92. </view>
  93. </view>
  94. </scroll-view>
  95. </block>
  96. </view>
  97. <view
  98. class="banner-box"
  99. hidden="{{active === '2'}}">
  100. <image
  101. class="banner"
  102. src="{{item}}"
  103. mode="widthFix"
  104. wx:for="{{objProductDetail.product_detail_img_list}}"
  105. wx:key="index"
  106. data-index="{{index}}"
  107. data-imgs="{{objProductDetail.product_detail_img_list}}"
  108. bind:tap="handlePreviewImage"></image>
  109. </view>
  110. <view
  111. hidden="{{active === '1'}}">
  112. <business-detail-large
  113. shopDetail="{{shopDetail}}"/>
  114. </view>
  115. <view
  116. class="fixed-bottom"
  117. hidden="{{active === '2'}}">
  118. <view>
  119. <button
  120. class="btn-collection"
  121. type="primary"
  122. disabled="{{booLock}}"
  123. bind:tap="productCollect"
  124. wx:if="{{searchForm.type >= 1}}">{{searchForm.type === 2 ? '取消收藏' : '添加收藏'}}
  125. </button>
  126. </view>
  127. </view>
  128. <wxs src="../../components/wxs/index.wxs" module="tools"></wxs>