index.wxml 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <n-spin spinning="{{loading}}">
  2. <view class="goods-head" wx:if="{{swipepics && swipepics.length > 0}}">
  3. <n-swipescreen width="{{swipewidth}}" height="{{swipeHeight}}" class="{{movecls}}" dots="{{true}}">
  4. <n-swipescreen-item wx:for="{{swipepics}}" wx:key="index">
  5. <t-image id="nx{{index}}" src="{{item}}" t-class="timgcasourel" wx:key="index" data-idx="{{index}}" bindtap="onPreview" />
  6. </n-swipescreen-item>
  7. </n-swipescreen>
  8. </view>
  9. <view class="goods-info">
  10. <view class="price-bar px-4 pt-1">
  11. <view class="price-info">
  12. <view>
  13. <n-price wr-class="goods-price" symbol-class="class-goods-symbol" price="{{minSalePrice}}" />
  14. <text wx:if="{{minSalePrice < maxSalePrice}}" class="goods-price-up px-1">起</text>
  15. </view>
  16. <n-price wr-class="goods-del" price="{{minLinePrice}}" type="delthrough" />
  17. </view>
  18. <view class="text-sm gray-4">
  19. 已售{{soldNum}}
  20. </view>
  21. </view>
  22. <view class="split-bar px-4 pt-2" style="border-bottom-width: 1px;">
  23. <view class="d-flex align-items-center">
  24. <view class="flex-1 pr-1 text-md gray-1">
  25. {{details.title}}
  26. </view>
  27. <t-button variant="text" t-class="btn-gray-plain p-0 mr-3" bind:tap="gotodownload" wx:if="{{!downloading}}">
  28. <view class="d-flex align-items-center flex-column" style="line-height: 1;">
  29. <t-icon name="download" size="{{16}}" />
  30. <view class="text-xs pt-1">下载</view>
  31. </view>
  32. </t-button>
  33. <t-button variant="text" t-class="btn-gray-plain p-0 mr-3" wx:else>
  34. <view class="d-flex align-items-center flex-column" style="line-height: 1;">
  35. <t-icon name="loading" t-class="spinning" size="{{16}}" />
  36. <view class="text-xs pt-1">稍等</view>
  37. </view>
  38. </t-button>
  39. <t-button variant="text" t-class="btn-gray-plain p-0" open-type="share">
  40. <view class="d-flex align-items-center flex-column" style="line-height: 1;">
  41. <t-icon name="share" size="{{16}}" />
  42. <view class="text-xs pt-1">分享</view>
  43. </view>
  44. </t-button>
  45. </view>
  46. </view>
  47. <view class="split-bar px-4 py-3 text-sm d-flex align-items-center gray-4" bindtap="toAddCart">
  48. <view>已选:</view>
  49. <view class="flex-1 gray-1">
  50. {{selectedAttrStr && selectedAttrStr.length > 0 ? selectedAttrStr : "未选择"}}
  51. </view>
  52. <t-icon name="chevron-right" size="{{14}}" />
  53. </view>
  54. <view class="px-4 pt-4">
  55. <view wx:if="{{details.description.length > 0}}" wx:for="{{details.description}}" wx:key="index">
  56. <t-image t-class="desc-content__img" src="{{item.url}}" mode="widthFix" />
  57. </view>
  58. <t-collapse default-value="{{['details']}}">
  59. <t-collapse-panel t-class-header="px-0 gray-1" t-class-content="px-0" value="delivery" header="配送信息">
  60. <view class="gray-1">
  61. {{details.delivery||""}}
  62. </view>
  63. </t-collapse-panel>
  64. <t-collapse-panel t-class-header="px-0 gray-1" t-class-content="px-0" value="feedback" header="支付与退换货">
  65. <view class="gray-1">
  66. {{details.aftermarket||""}}
  67. </view>
  68. </t-collapse-panel>
  69. </t-collapse>
  70. </view>
  71. <view class="pt-4 text-md gray-2" wx:if="{{favList && favList.length > 0}}" style="background-color: #f5f5f5;">
  72. <view class="px-4 pb-4">猜你喜欢</view>
  73. <view class="d-flex align-items-center">
  74. <t-icon name="chevron-left" />
  75. <view class="flex-1 overflow-hidden">
  76. <scroll-view scroll-x style="white-space: nowrap;" bindscrolltolower="handleReachBottom">
  77. <view class="d-flex pb-2" style="column-gap: 30rpx;">
  78. <view wx:for="{{favList}}" wx:for-item="item" wx:key="index">
  79. <n-good-card id="fav-gd-{{index}}" data="{{item}}" currency="{{item.currency || '¥'}}" thresholds="{{thresholds}}" class="goods-card-inside" data-index="{{index}}" bind:thumb="onClickGoodsThumb" bind:click="gotoGoodsDetail" bind:add-cart="onAddCart" />
  80. </view>
  81. <view style="padding-top: 150rpx;" wx:if="{{loadMoreStatus !== 2}}">
  82. <t-loading />
  83. </view>
  84. </view>
  85. </scroll-view>
  86. </view>
  87. <t-icon name="chevron-right" />
  88. </view>
  89. </view>
  90. <!-- <view class="px-4 pt-4 text-md gray-2" wx:if="{{commentsDto && commentsDto.items}}">
  91. <view class="d-flex align-items-center pb-2" bindtap="gotoComments">
  92. <view class="flex-1">商品评价({{commentsDto.totalItems}})</view>
  93. <view class="text-sm gray-4">{{commentsDto.rate}}%好评</view>
  94. <t-icon name="chevron-right" size="{{20}}" style="color: #bbb" />
  95. </view>
  96. <n-comments-card wx:for="{{ commentsDto.items }}" wx:for-item="commentItem" wx:key="goodsSpu" userAvatar="{{commentItem.userAvatar}}" userName="{{commentItem.userName}}" content="{{commentItem.content}}" score="{{commentItem.score}}" commentTime="{{commentItem.commentTime}}" />
  97. </view> -->
  98. </view>
  99. <view class="goods-bottom-operation">
  100. <n-buy-bar noDraw="{{nodraws}}" wr-sold-out="text-sm" jumpArray="{{jumpArray}}" soldout="{{soldout}}" isStock="{{isStock}}" shopCartNum="{{cartNum}}" buttonType="{{buttonType}}" bind:toAddCart="toAddCart" bind:toNav="toNav" bind:toJum3D="gotoDraw" class="goods-details-card" addingCart="{{addingCart}}" />
  101. </view>
  102. <view style="height: {{soldout ? 100 : 50}}rpx" />
  103. </n-spin>
  104. <n-pop-right open="{{true}}" bind:disagree="handleAuthDisagree" bind:ok="handleAuthOK" />
  105. <n-goods-specs-popup id="goodsSpecsPopup" show="{{isSpuSelectPopupShow}}" title="{{details.title || ''}}" src="{{specImg ? specImg : primaryImage}}" specList="{{details.specList || []}}" skuList="{{skuArray}}" limitBuyInfo="{{details.limitInfo[0].text || ''}}" limitMaxCount="{{limitMaxCount}}" limitMinCount="{{limitMinCount}}" limitBuyInfo="{{limitBuyInfo}}" bind:closeSpecsPopup="handlePopupHide" bind:change="chooseSpecItem" bind:changeNum="changeNum" bind:addCart="addCart" bind:specsConfirm="specsConfirm" isStock="{{isStock}}" outOperateStatus="{{outOperateStatus}}">
  106. <view slot="goods-price">
  107. <view class="popup-sku__price">
  108. <n-price price="{{isAllSelectedSku ? selectSkuSellPrice : minSalePrice }}" wr-class="goods-price" symbol-class="popup-sku__price-symbol" class="mr-2" />
  109. <n-price price="{{isAllSelectedSku ? selectSkuLinePrice : minLinePrice}}" wr-class="goods-del" type="delthrough" />
  110. </view>
  111. </view>
  112. </n-goods-specs-popup>
  113. <t-popup visible="{{drawshow}}" placement="bottom" bind:visible-change="handleDrawPopupHide">
  114. <view class="d-flex chooseblock" style="gap: 20rpx">
  115. <view class="chooseitem {{!details.draws2D || details.draws2D.length === 0 && 'disable'}}" data-type="flat" bind:tap="gotoFly">
  116. <t-icon prefix="hn" name="flat" t-class="chooseicon" />
  117. <view>平面配画</view>
  118. </view>
  119. <view class="choosedivide" />
  120. <view class="chooseitem {{!details.draws || details.draws.length === 0 && 'disable'}}" data-type="space" bind:tap="gotoFly">
  121. <t-icon prefix="hn" name="space" t-class="chooseicon" />
  122. <view>空间配画</view>
  123. </view>
  124. </view>
  125. </t-popup>
  126. <t-toast id="t-toast" />
  127. <wxs module="col">
  128. var stringify = function (val) {
  129. return JSON.stringify(val)
  130. }
  131. module.exports = {
  132. stringify: stringify
  133. }
  134. </wxs>