goods.wxml 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. <view class="container">
  2. <swiper class="goodsimgs" indicator-dots="true" autoplay="true" interval="3000" duration="1000">
  3. <swiper-item wx:for="{{gallery}}" wx:key="{{item.id}}">
  4. <image bindtap='preview' data-url="{{item.imgUrl}}" src="{{item.imgUrl}}" background-size="cover"></image>
  5. </swiper-item>
  6. </swiper>
  7. <view class="location-time">
  8. <view class="icon time">最后编辑:{{goods.lastEdit}}</view>
  9. <view class="icon location">地点:{{goods.region}}</view>
  10. </view>
  11. <view class="goods-info">
  12. <view class="c">
  13. <text class="name">{{goods.name}}</text>
  14. <view class='flex'>
  15. <text class="price">¥{{goods.price}}</text>
  16. <view wx:if='{{!goods.isSelling}}' class='tag'>已出售</view>
  17. </view>
  18. <text wx:if="{{goods.marketPrice}}" class="market-price">原价 : ¥{{goods.marketPrice}}</text>
  19. <text class="desc">{{goods.desc}}</text>
  20. </view>
  21. </view>
  22. <view class="section-nav section-act">
  23. <view class="t" wx:if='{{goods.ableExpress||goods.ableMeet||goods.ableSelfTake}}'>
  24. <view class="tag r" wx:if="{{goods.ableExpress}}">{{!goods.postage?'包邮':'邮费:'+goods.postage+'元'}}</view>
  25. <view class="tag y" wx:if="{{goods.ableExpress}}">支持:邮寄</view>
  26. <view class="tag y" wx:if="{{goods.ableMeet}}">支持:同城面交</view>
  27. <view class="tag y" wx:if="{{goods.ableSelfTake}}">支持:自提</view>
  28. </view>
  29. <view class="t">
  30. <view class="tag">{{goods.wantCount}}人想要</view>
  31. <view class="tag">浏览 {{goods.browseCount}}</view>
  32. </view>
  33. </view>
  34. <navigator url="/pages/user/user?userId={{seller.openId}}" class="seller-nav section-act">
  35. <view class="seller-t">
  36. <image class="seller-avatar" src="{{seller.avatarUrl}}"></image>
  37. </view>
  38. <view class="seller-info">
  39. <view class="name">{{seller.nickName}}</view>
  40. <view class="history">加入平台第{{sellerDates}}天,卖出过{{sellerHistory}}件宝贝</view>
  41. </view>
  42. <image class="i" src="../../static/images/address_right.png" background-size="cover"></image>
  43. </navigator>
  44. <view class="comments" wx:if="{{comment.length > 0}}">
  45. <view class="h">
  46. <text class="t">留言</text>
  47. </view>
  48. <view class="b">
  49. <view wx:for="{{comment}}" wx:for-index="index" wx:for-item="item" wx:key="{{item.id}}">
  50. <!-- comment -->
  51. <view class="item">
  52. <view class="info">
  53. <view class="user">
  54. <navigator class='navimg' url="/pages/user/user?userId={{item.simpleUser.openId}}" wx: style="background-image: url('{{item.simpleUser.avatarUrl}}')">
  55. </navigator>
  56. <text>{{item.simpleUser.nickName}}</text>
  57. </view>
  58. <view class="time">{{item.createTime}}</view>
  59. </view>
  60. <view class="content" bindtap="switchCommentPop" data-reply-id="{{item.id}}" data-reply-user-id="{{item.simpleUser.openId}}" data-reply-user-name='{{item.simpleUser.nickName}}'>
  61. {{item.content}}
  62. </view>
  63. <!-- reply -->
  64. <view wx:for="{{item.replyList}}" wx:for-index="iindex" wx:for-item="iitem" wx:key="{{iitem.id}}">
  65. <view class="reply-info">
  66. <view class="reply-user">
  67. <navigator class='navimg-reply' url="/pages/user/user?userId={{iitem.simpleUser.openId}}" wx: style="background-image: url('{{iitem.simpleUser.avatarUrl}}')"></navigator>
  68. <text>{{iitem.simpleUser.nickName}}</text>
  69. </view>
  70. <view class="time">{{iitem.createTime}}</view>
  71. </view>
  72. <view class="reply-content" bindtap="switchCommentPop" data-reply-id="{{iitem.id}}" data-reply-user-id="{{iitem.simpleUser.openId}}" data-reply-user-name='{{iitem.simpleUser.nickName}}'>
  73. 回复@{{iitem.replyUserName}}:{{iitem.content}}
  74. </view>
  75. </view>
  76. <!-- reoly-end -->
  77. </view>
  78. <!-- comment-end -->
  79. </view>
  80. </view>
  81. </view>
  82. <view class="related-goods" wx:if="{{relatedGoods.length > 0}}">
  83. <view class="h">
  84. <view class="line"></view>
  85. <text class="title">大家都在看</text>
  86. </view>
  87. <view class="b">
  88. <view class="item" wx:for="{{relatedGoods}}" wx:key="{{item.id}}">
  89. <navigator url="/pages/goods/goods?id={{item.id}}">
  90. <image class="img" src="{{item.primaryPicUrl}}" background-size="cover"></image>
  91. <text class="name">{{item.name}}</text>
  92. <text class="price">¥{{item.price}}</text>
  93. </navigator>
  94. </view>
  95. </view>
  96. </view>
  97. </view>
  98. <view class="attr-pop-box" hidden="{{!openComment}}">
  99. <view class="attr-pop">
  100. <!-- <view class="close" bindtap="closeComment">
  101. <image class="icon" src="/static/images/clear_input.png"></image>
  102. </view> -->
  103. <view class="post-comment">
  104. <view class="title" wx:if="{{replyUserName}}">
  105. 回复@{{replyUserName}}:
  106. </view>
  107. <view class="title" wx:else>
  108. 发表留言:
  109. </view>
  110. <view class="content">
  111. <input id='comment-input' class='' focus='{{openComment}}' placeholder="输入文本" maxlength='100' bindblur='closeComment' bindconfirm='postComment' value='{{commentContent}}' />
  112. </view>
  113. </view>
  114. </view>
  115. </view>
  116. <view class="attr-pop-box" hidden="{{!openDelete}}">
  117. <view class="delete-pop ">
  118. <view class="close" bindtap="closeDelete">
  119. <image class="icon" src="/static/images/clear_input.png"></image>
  120. </view>
  121. <button class='delete-btn' bindtap="deleteGoods">确定删除</button>
  122. </view>
  123. </view>
  124. <view class="bottom-btn">
  125. <view class="l" bindtap="addCannelCollect">
  126. <image class="icon" src="{{ collectBackImage }}"></image>
  127. 收藏
  128. </view>
  129. <view class="l" bindtap="switchCommentPop" data-reply-id="0" data-reply-user-name='' data-reply-user-id="0">
  130. <image class="icon" src="/static/images/ic_menu_chat_nor.png"></image>
  131. 留言
  132. </view>
  133. <!-- <view class="l" >
  134. <image class="icon" src="/static/images/ic_menu_chat_nor.png"></image>
  135. 留言
  136. </view> -->
  137. <!-- <view class="l l-cart">
  138. <view class="box">
  139. <text class="cart-count">{{cartGoodsCount}}</text>
  140. <image bindtap="openCartPage" class="icon" src="/static/images/ic_menu_shoping_nor.png"></image>
  141. </view>
  142. </view> -->
  143. <!-- <view class="c">立即购买</view> -->
  144. <view class="r" wx:if='{{!goods.isSelling}}' bindtap="addToCart">该商品已出售</view>
  145. <view class="r" wx:elif="{{isSeller && !goods.isDelete && goods.isSelling}}" bindtap="switchDeletetPop">删除该商品</view>
  146. <view class="r" wx:else bindtap="addToCart">想要</view>
  147. </view>