goods.wxml 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  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 src="{{item.img_url}}" background-size="cover"></image>
  5. </swiper-item>
  6. </swiper>
  7. <view class="service-policy">
  8. <view class="item">30天无忧退货</view>
  9. <view class="item">48小时快速退款</view>
  10. <view class="item">满88元免邮费</view>
  11. </view>
  12. <view class="goods-info">
  13. <view class="c">
  14. <text class="name">{{goods.name}}</text>
  15. <text class="desc">{{goods.goods_brief}}</text>
  16. <text class="price">¥{{goods.retail_price}}</text>
  17. <view class="brand" wx:if="{{brand.name}}">
  18. <navigator url="../brandDetail/brandDetail?id={{brand.brandId}}">
  19. <text>{{brand.name}}</text>
  20. </navigator>
  21. </view>
  22. </view>
  23. </view>
  24. <view class="section-nav section-attr" bindtap="switchAttrPop">
  25. <view class="t">请选择规格数量</view>
  26. <image class="i" src="../../static/images/address_right.png" background-size="cover"></image>
  27. </view>
  28. <!--<view class="section-nav section-act">
  29. <view class="t">
  30. <view class="label">1个促销:</view>
  31. <view class="tag">万圣趴</view>
  32. <view class="text">全场满499,额外送糖果</view>
  33. </view>
  34. <image class="i" src="../../static/images/address_right.png" background-size="cover"></image>
  35. </view>-->
  36. <view class="comments" wx:if="{{comment.count > 0}}">
  37. <view class="h">
  38. <navigator url="../comment/comment?valueId={{goods.id}}&typeId=0">
  39. <text class="t">评价({{comment.count > 999 ? '999+' : comment.count}})</text>
  40. <text class="i">查看全部</text>
  41. </navigator>
  42. </view>
  43. <view class="b">
  44. <view class="item">
  45. <view class="info">
  46. <view class="user">
  47. <image src="{{comment.data.avatar}}"></image>
  48. <text>{{comment.data.nickname}}</text>
  49. </view>
  50. <view class="time">{{comment.data.add_time}}</view>
  51. </view>
  52. <view class="content">
  53. {{comment.data.content}}
  54. </view>
  55. <view class="imgs" wx:if="{{comment.data.pic_list.length > 0}}">
  56. <image class="img" wx:for="{{comment.data.pic_list}}" wx:key="{{item.id}}" src="{{item.pic_url}}"></image>
  57. </view>
  58. <!-- <view class="spec">白色 2件</view> -->
  59. </view>
  60. </view>
  61. </view>
  62. <view class="goods-attr">
  63. <view class="t">商品参数</view>
  64. <view class="l">
  65. <view class="item" wx:for="{{attribute}}" wx:key="{{item.name}}">
  66. <text class="left">{{item.name}}</text>
  67. <text class="right">{{item.value}}</text>
  68. </view>
  69. </view>
  70. </view>
  71. <view class="detail">
  72. <import src="../../lib/wxParse/wxParse.wxml" />
  73. <template is="wxParse" data="{{wxParseData:goodsDetail.nodes}}" />
  74. </view>
  75. <view class="common-problem">
  76. <view class="h">
  77. <view class="line"></view>
  78. <text class="title">常见问题</text>
  79. </view>
  80. <view class="b">
  81. <view class="item" wx:for="{{issueList}}" wx:key="{{item.id}}">
  82. <view class="question-box">
  83. <text class="spot"></text>
  84. <text class="question">{{item.question}}</text>
  85. </view>
  86. <view class="answer">
  87. {{item.answer}}
  88. </view>
  89. </view>
  90. </view>
  91. </view>
  92. <view class="related-goods" wx:if="{{relatedGoods.length > 0}}">
  93. <view class="h">
  94. <view class="line"></view>
  95. <text class="title">大家都在看</text>
  96. </view>
  97. <view class="b">
  98. <view class="item" wx:for="{{relatedGoods}}" wx:key="{{item.id}}">
  99. <navigator url="/pages/goods/goods?id={{item.id}}">
  100. <image class="img" src="{{item.list_pic_url}}" background-size="cover"></image>
  101. <text class="name">{{item.name}}</text>
  102. <text class="price">¥{{item.retail_price}}</text>
  103. </navigator>
  104. </view>
  105. </view>
  106. </view>
  107. </view>
  108. <view class="attr-pop-box" hidden="{{!openAttr}}">
  109. <view class="attr-pop">
  110. <view class="close" bindtap="closeAttr">
  111. <image class="icon" src="/static/images/icon_close.png"></image>
  112. </view>
  113. <view class="img-info">
  114. <image class="img" src="{{gallery[0].img_url}}"></image>
  115. <view class="info">
  116. <view class="c">
  117. <view class="p">价格:¥{{goods.retail_price}}</view>
  118. <view class="a" wx:if="{{productList.length>0}}">已选择:{{checkedSpecText}}</view>
  119. </view>
  120. </view>
  121. </view>
  122. <view class="spec-con">
  123. <view class="spec-item" wx:for="{{specificationList}}" wx:key="{{item.specification_id}}">
  124. <view class="name">{{item.name}}</view>
  125. <view class="values">
  126. <view class="value {{vitem.checked ? 'selected' : ''}}" bindtap="clickSkuValue" wx:for="{{item.valueList}}" wx:for-item="vitem" wx:key="{{vitem.id}}" data-value-id="{{vitem.id}}" data-name-id="{{vitem.specification_id}}">{{vitem.value}}</view>
  127. </view>
  128. </view>
  129. <view class="number-item">
  130. <view class="name">数量</view>
  131. <view class="selnum">
  132. <view class="cut" bindtap="cutNumber">-</view>
  133. <input value="{{number}}" class="number" disabled="true" type="number" />
  134. <view class="add" bindtap="addNumber">+</view>
  135. </view>
  136. </view>
  137. </view>
  138. </view>
  139. </view>
  140. <view class="bottom-btn">
  141. <view class="l l-collect" bindtap="addCannelCollect">
  142. <image class="icon" src="{{ collectBackImage }}"></image>
  143. </view>
  144. <view class="l l-cart">
  145. <view class="box">
  146. <text class="cart-count">{{cartGoodsCount}}</text>
  147. <image bindtap="openCartPage" class="icon" src="/static/images/ic_menu_shoping_nor.png"></image>
  148. </view>
  149. </view>
  150. <view class="c">立即购买</view>
  151. <view class="r" bindtap="addToCart">加入购物车</view>
  152. </view>