goodsDetail.wxml 3.2 KB

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