goods.wxml 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. <view class="container">
  2. <swiper class="goodsimgs" indicator-dots="true" autoplay="true" interval="3000" duration="1000">
  3. <swiper-item wx:for="{{goods.gallery}}" wx:key="*this">
  4. <image src="../../static/images/{{id}}.png" background-size="cover"></image>
  5. </swiper-item>
  6. </swiper>
  7. <!-- 商品信息 -->
  8. <view class="goods-info">
  9. <view class="c">
  10. <text class="name">{{goods.name}}</text>
  11. <text class="desc">{{goods.brief}}</text>
  12. <view class="price">
  13. <view class="counterPrice">原价:¥{{goods.counterPrice}}</view>
  14. <view class="retailPrice">现价:¥{{checkedSpecPrice}}</view>
  15. </view>
  16. <view class="brand" wx:if="{{brand.name}}">
  17. <navigator url="../brandDetail/brandDetail?id={{brand.id}}">
  18. <text>{{brand.name}}</text>
  19. </navigator>
  20. </view>
  21. </view>
  22. </view>
  23. <!-- 规格框体 -->
  24. <view class="section-nav section-attr" bindtap="switchAttrPop">
  25. <view class="t">{{checkedSpecText}}</view>
  26. <image class="i" src="/static/images/address_right.png" background-size="cover"></image>
  27. </view>
  28. <view class="goods-attr">
  29. <view class="t">商品参数</view>
  30. <view class="l">
  31. <view class="item" wx:for="{{attribute}}" wx:key="name">
  32. <text class="left">{{item.attribute}}</text>
  33. <text class="right">{{item.value}}</text>
  34. </view>
  35. </view>
  36. </view>
  37. <view class="detail">
  38. <import src="/lib/wxParse/wxParse.wxml" />
  39. <template is="wxParse" data="{{wxParseData:goodsDetail.nodes}}" />
  40. </view>
  41. <view class="common-problem">
  42. <view class="h">
  43. <view class="line"></view>
  44. <text class="title">常见问题</text>
  45. </view>
  46. <view class="b">
  47. <view class="item" wx:for="{{issueList}}" wx:key="id">
  48. <view class="question-box">
  49. <text class="spot"></text>
  50. <text class="question">{{item.question}}</text>
  51. </view>
  52. <view class="answer">
  53. {{item.answer}}
  54. </view>
  55. </view>
  56. </view>
  57. </view>
  58. <!-- 大家都在看 -->
  59. <view class="related-goods" wx:if="{{relatedGoods.length > 0}}">
  60. <view class="h">
  61. <view class="line"></view>
  62. <!--<text class="title">大家都在看</text>-->
  63. </view>
  64. <!--<goodList goods="{{relatedGoods}}"></goodList> -->
  65. </view>
  66. </view>
  67. -->
  68. <!-- 规格选择界面 -->
  69. <view class="attr-pop-box" hidden="{{!openAttr}}">
  70. <view class="attr-pop">
  71. <view class="close" bindtap="closeAttr">
  72. <image class="icon" src="/static/images/icon_close.png"></image>
  73. </view>
  74. <view class="img-info">
  75. <image class="img" src="{{goods.picUrl}}"></image>
  76. <view class="info">
  77. <view class="c">
  78. <view class="p">价格:¥{{checkedSpecPrice}}</view>
  79. <view class="a">{{tmpSpecText}}</view>
  80. </view>
  81. </view>
  82. </view>
  83. <!-- 规格列表 -->
  84. <view class="spec-con">
  85. <view class="spec-item" wx:for="{{specificationList}}" wx:key="name">
  86. <view class="name">{{item.name}}</view>
  87. <view class="values">
  88. <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="{{vitem.specification}}">{{vitem.value}}</view>
  89. </view>
  90. </view>
  91. <view class="spec-con" wx:if="{{groupon.length > 0}}">
  92. <view class="spec-item">
  93. <view class="name">团购立减</view>
  94. <view class="values">
  95. <view class="value {{vitem.checked ? 'selected' : ''}}" bindtap="clickGroupon" wx:for="{{groupon}}" wx:for-item="vitem" wx:key="{{vitem.id}}" data-value-id="{{vitem.id}}" data-name="{{vitem.specification}}">¥-{{vitem.discount}} ({{vitem.discountMember}}人)</view>
  96. </view>
  97. </view>
  98. </view>
  99. <!-- 数量 -->
  100. <view class="number-item">
  101. <view class="name">数量</view>
  102. <view class="selnum">
  103. <view class="cut" bindtap="cutNumber">-</view>
  104. <input value="{{number}}" class="number" disabled="true" type="number" />
  105. <view class="add" bindtap="addNumber">+</view>
  106. </view>
  107. </view>
  108. </view>
  109. </view>
  110. </view>
  111. <!-- 联系客服 -->
  112. <view class="contact">
  113. <contact-button style="opacity:0;position:absolute;" type="default-dark" session-from="weapp" size="27">
  114. </contact-button>
  115. </view>
  116. <!-- 顶部提示 -->
  117. <van-notify id="van-notify" />
  118. <!-- 分享框体界面 -->
  119. <sharePop id="sharePop" bottom="80" url="{{shareImage}}"></sharePop>
  120. <!-- 底部按钮 -->
  121. <view class="bottom-btn">
  122. <view class="l l-collect"open-type="openSetting" bindopensetting="handleSetting" wx:if="{{(!isGroupon) && (!canWrite) }}">
  123. <image class="icon" src="../../images/goods-share.png" />
  124. </view>
  125. <view class="l l-collect" bindtap="showShare" wx:if="{{!isGroupon && canWrite}}">
  126. <image class="icon" src="../../images/goods-share.png" />
  127. </view>
  128. <view class="l l-cart" wx:if="{{!isGroupon}}">
  129. <view class="box">
  130. <text class="cart-count">{{cartGoodsCount}}</text>
  131. <image bindtap="openCartPage" class="icon" src="/static/images/ic_menu_shoping_nor.png"></image>
  132. </view>
  133. </view>
  134. <view class="r" bindtap="addToCart" wx:if="{{!soldout}}" wx:if="{{!isGroupon}}">加入购物车</view>
  135. <view class="c" bindtap="addFast" wx:if="{{!soldout}}">{{isGroupon?'参加团购':'立即购买'}}</view>
  136. <view class="n" wx:if="{{soldout}}">商品已售空</view>
  137. </view>