index.wxml 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. <view class="goods-detail-page">
  2. <view class="goods-head">
  3. <t-swiper
  4. wx:if="{{details.images.length > 0}}"
  5. height="750rpx"
  6. current="{{current}}"
  7. autoplay="{{autoplay}}"
  8. duration="{{duration}}"
  9. interval="{{interval}}"
  10. navigation="{{navigation}}"
  11. list="{{details.images}}"
  12. ></t-swiper>
  13. <view class="goods-info">
  14. <view class="goods-number">
  15. <view class="goods-price">
  16. <price
  17. wr-class="class-goods-price"
  18. symbol-class="class-goods-symbol"
  19. price="{{minSalePrice}}"
  20. type="lighter"
  21. />
  22. <view class="goods-price-up">起</view>
  23. <price wr-class="class-goods-del" price="{{maxLinePrice}}" type="delthrough" />
  24. </view>
  25. <view class="sold-num">已售{{soldNum}}</view>
  26. </view>
  27. <view wx:if="{{activityList.length > 0}}" class="goods-activity" bindtap="showPromotionPopup">
  28. <view class="tags-container">
  29. <view wx:for="{{activityList}}" data-promotionId="{{item.promotionId}}" wx:key="index" wx:if="{{index<4}}">
  30. <view class="goods-activity-tag">{{item.tag}}</view>
  31. </view>
  32. </view>
  33. <view class="activity-show">
  34. <view class="activity-show-text">领劵</view>
  35. <t-icon name="chevron-right" size="42rpx" />
  36. </view>
  37. </view>
  38. <view class="goods-title">
  39. <view class="goods-name">{{details.title}}</view>
  40. <view class="goods-tag">
  41. <t-button open-type="share" t-class="shareBtn" variant="text">
  42. <view class="btn-icon">
  43. <t-icon name="share" size="40rpx" color="#000" />
  44. <view class="share-text">分享</view>
  45. </view>
  46. </t-button>
  47. </view>
  48. </view>
  49. <view class="goods-intro">{{intro}}</view>
  50. </view>
  51. <view class="spu-select" bindtap="showSkuSelectPopup">
  52. <view class="label">已选</view>
  53. <view class="content">
  54. <view class="{{!selectedAttrStr ? 'tintColor' : ''}}">
  55. {{selectedAttrStr ? buyNum : ''}}{{selectedAttrStr || '请选择'}}
  56. </view>
  57. <t-icon name="chevron-right" size="40rpx" color="#BBBBBB" />
  58. </view>
  59. </view>
  60. <view wx:if="{{ commentsStatistics.commentCount > 0 }}" class="comments-wrap">
  61. <view class="comments-head" bindtap="navToCommentsListPage">
  62. <view class="comments-title-wrap">
  63. <view class="comments-title-label">商品评价</view>
  64. <view class="comments-title-count"> ({{ commentsStatistics.commentCount }}) </view>
  65. </view>
  66. <view class="comments-rate-wrap">
  67. <view class="comments-good-rate">{{commentsStatistics.goodRate}}% 好评</view>
  68. <t-icon name="chevron-right" size="40rpx" color="#BBBBBB" />
  69. </view>
  70. </view>
  71. <view class="comment-item-wrap" wx:for="{{ commentsList }}" wx:for-item="commentItem" wx:key="goodsSpu">
  72. <view class="comment-item-head">
  73. <t-image src="{{commentItem.userHeadUrl}}" t-class="comment-item-avatar" />
  74. <view class="comment-head-right">
  75. <view class="comment-username">{{commentItem.userName}}</view>
  76. <t-rate
  77. value="{{ commentItem.commentScore }}"
  78. count="{{5}}"
  79. size="12"
  80. gap="2"
  81. color="{{['#ffc51c', '#ddd']}}"
  82. />
  83. </view>
  84. </view>
  85. <view class="comment-item-content"> {{commentItem.commentContent}} </view>
  86. </view>
  87. </view>
  88. </view>
  89. <view class="desc-content">
  90. <view class="desc-content__title" wx:if="{{details.desc.length > 0}}">
  91. <t-image t-class="img" src="{{recLeftImg}}" />
  92. <span class="desc-content__title--text">详情介绍</span>
  93. <t-image t-class="img" src="{{recRightImg}}" />
  94. </view>
  95. <view wx:if="{{details.desc.length > 0}}" wx:for="{{details.desc}}" wx:key="index">
  96. <t-image t-class="desc-content__img" src="{{item}}" mode="widthFix" />
  97. </view>
  98. </view>
  99. <view class="goods-bottom-operation">
  100. <buy-bar
  101. jumpArray="{{jumpArray}}"
  102. soldout="{{soldout}}"
  103. isStock="{{isStock}}"
  104. shopCartNum="{{cartNum}}"
  105. buttonType="{{buttonType}}"
  106. bind:toAddCart="toAddCart"
  107. bind:toNav="toNav"
  108. bind:toBuyNow="buyItNow"
  109. class="goods-details-card"
  110. />
  111. </view>
  112. <goods-specs-popup
  113. id="goodsSpecsPopup"
  114. show="{{isSpuSelectPopupShow}}"
  115. title="{{details.title || ''}}"
  116. src="{{specImg ? specImg : primaryImage}}"
  117. specList="{{details.specList || []}}"
  118. skuList="{{skuArray}}"
  119. limitBuyInfo="{{details.limitInfo[0].text || ''}}"
  120. bind:closeSpecsPopup="handlePopupHide"
  121. bind:change="chooseSpecItem"
  122. bind:changeNum="changeNum"
  123. bind:addCart="addCart"
  124. bind:buyNow="gotoBuy"
  125. bind:specsConfirm="specsConfirm"
  126. isStock="{{isStock}}"
  127. outOperateStatus="{{outOperateStatus}}"
  128. >
  129. <view slot="goods-price">
  130. <view class="popup-sku__price">
  131. <price
  132. wx:if="{{!isAllSelectedSku || (!promotionSubCode && isAllSelectedSku)}}"
  133. price="{{selectSkuSellsPrice ? selectSkuSellsPrice : minSalePrice }}"
  134. wr-class="popup-sku__price-num"
  135. symbol-class="popup-sku__price-symbol"
  136. />
  137. <price
  138. wx:if="{{selectSkuSellsPrice === 0 && minSalePrice !== maxSalePrice && !isAllSelectedSku}}"
  139. price="{{maxSalePrice}}"
  140. wr-class="popup-sku__price-del"
  141. type="delthrough"
  142. />
  143. </view>
  144. </view>
  145. </goods-specs-popup>
  146. <promotion-popup
  147. list="{{list}}"
  148. bind:closePromotionPopup="closePromotionPopup"
  149. show="{{isShowPromotionPop}}"
  150. bind:promotionChange="promotionChange"
  151. />
  152. </view>
  153. <t-toast id="t-toast" />