cps-jd.wxml 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. <view class="container">
  2. <van-sticky wx:if="{{createTabs}}">
  3. <view id="tabs" class="tabs-container">
  4. <van-tabs sticky bind:click="onTabsChange" custom-class="" active="{{ active }}">
  5. <van-tab wx:for="{{tabs}}" title="{{item.tabs_name}}" name="{{item.tabs_name}}" />
  6. </van-tabs>
  7. </view>
  8. </van-sticky>
  9. <scroll-view class="scroll-container" scroll-into-view="{{toView}}" scroll-y="true" scroll-with-animation="true"
  10. bindscroll="bindscroll">
  11. <view class="swiper-container" id="swiper-container">
  12. <swiper class="swiper_box" indicator-dots="true" indicator-active-color="#fff" autoplay circular>
  13. <swiper-item wx:for="{{cpsJdGoodsDetail.imageInfo.imageList}}" wx:key="id">
  14. <image src="{{item.url}}" class="slide-image" mode="aspectFill" lazy-load="true" />
  15. </swiper-item>
  16. </swiper>
  17. </view>
  18. <view class="goods-info vcell">
  19. <view class="goods-info-top-container">
  20. <view class="goods-profile">
  21. <view class="p"><text>¥</text> {{goodsDetail.basicInfo.minPrice}}</view>
  22. <view wx:if="{{goodsDetail.basicInfo.originalPrice && goodsDetail.basicInfo.originalPrice > 0}}" class="goods-price"
  23. style='color:#aaa;text-decoration:line-through;padding: 15rpx 0rpx 0rpx 15rpx;'><text>¥</text>
  24. {{goodsDetail.basicInfo.originalPrice}}</view>
  25. </view>
  26. <view class="goods-info-fx">
  27. <view class='item left'>
  28. <van-icon name="share-o" size="24px" />
  29. <view class="icon-title">分享</view>
  30. <button open-type='share'></button>
  31. </view>
  32. <view class='item' bindtap="drawSharePic">
  33. <van-icon name="qr" size="24px" />
  34. <view class="icon-title">二维码</view>
  35. </view>
  36. </view>
  37. </view>
  38. <view class="goods-title">{{goodsDetail.basicInfo.name}}</view>
  39. <view class="characteristic">{{goodsDetail.basicInfo.characteristic}}</view>
  40. </view>
  41. <view class='space'></view>
  42. <view class="goods-des-info" style="margin-top:35rpx;" wx:if="{{pingtuanList}}">
  43. <view class="label-title" style="border-bottom:1px solid #eee;">{{pingtuanList.length}}人在拼单,可直接参与</view>
  44. <view class="goods-text" style="margin-top:15rpx;border-bottom:1px solid #eee;overflow:hidden;"
  45. wx:for="{{pingtuanList}}" wx:key="id">
  46. <view style="width:150rpx;float:left;">
  47. <image style="width: 150rpx; height: 150rpx;" src="{{item.apiExtUser.avatarUrl}}"></image>
  48. <view style="width:150rpx;text-align:center;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">
  49. {{item.apiExtUser.nick}}</view>
  50. </view>
  51. <view style="width:500rpx;float:left;margin-left:35rpx;">
  52. <view>已有
  53. <text style="color:red"> {{item.helpNumber}} </text>人参与</view>
  54. <view style="color: #B0B0B0;font-size:24rpx;">截止: {{item.dateEnd}}</view>
  55. <button type="warn" size="mini" data-pingtuanopenid="{{item.id}}" bindtap="toPingtuan"> 去拼单 </button>
  56. </view>
  57. </view>
  58. </view>
  59. <van-cell wx:if="{{hasMoreSelect && goodsDetailSkuShowType==0}}" custom-class="vw100" is-link
  60. bind:click="bindGuiGeTap">
  61. <view slot="title">
  62. 请选择:
  63. <block wx:for="{{goodsDetail.properties}}" wx:key="id"> {{item.name}}</block>
  64. <block wx:for="{{goodsAddition}}" wx:key="id"> {{item.name}}</block>
  65. </view>
  66. </van-cell>
  67. <view class="size-label-box2" wx:if="{{goodsDetailSkuShowType==1}}">
  68. <view class="label-title">选择商品规格</view>
  69. <view class="size-label-box">
  70. <block wx:for="{{goodsDetail.properties}}" wx:for-item="property" wx:for-index="idx" wx:key="id">
  71. <view class="label">{{property.name}}</view>
  72. <view class="label-item-box">
  73. <view class="label-item {{item.active ? 'active' : '' }}" wx:for="{{property.childsCurGoods}}" wx:key="id"
  74. bindtap="labelItemTap" data-propertyindex="{{idx}}" data-propertychildindex="{{index}}">
  75. {{item.name}}
  76. </view>
  77. </view>
  78. </block>
  79. </view>
  80. <van-cell title="购买数量">
  81. <view>
  82. <van-stepper value="{{ buyNumber }}" min="{{ buyNumMin }}" max="{{ buyNumMax }}" bind:change="stepChange" />
  83. </view>
  84. </van-cell>
  85. </view>
  86. <view wx:if="{{shopSubdetail}}" class="shop-container">
  87. <image mode="aspectFill" src="{{shopSubdetail.info.pic}}"></image>
  88. <view class="info">
  89. <view class="title">{{shopSubdetail.info.name}}</view>
  90. <view class="address">{{shopSubdetail.info.address}}</view>
  91. </view>
  92. </view>
  93. <view class="goods-des-info" id="goods-des-info">
  94. <view class="label-title">
  95. <view class="left">商品详情</view>
  96. </view>
  97. <view class="goods-text">
  98. <image wx:for="{{ cpsJdGoodsDetail.detailImagesArray }}" wx:key="id" mode="widthFix" src="{{ item }}"></image>
  99. </view>
  100. </view>
  101. <van-cell-group wx:if="{{!curGoodsKanjia && reputation}}" custom-class="vw100" title="宝贝评价">
  102. <block wx:for="{{reputation}}" wx:key="id">
  103. <van-cell custom-class="reputation-cell" icon="{{item.user.avatarUrl}}" title="{{item.user.nick}}"
  104. label="{{item.goods.dateReputation}}" border="{{ false }}">
  105. <van-rate value="{{ item.goods.goodReputation }}" color="#e64340" readonly />
  106. </van-cell>
  107. <van-cell wx:if="{{ item.goods.goodReputationRemark }}" title-class="reputation-cell-reamrk"
  108. title="{{item.goods.goodReputationRemark}}" />
  109. <view wx:if="{{ item.reputationPics }}" class="reputation-pics">
  110. <image wx:for="{{item.reputationPics}}" wx:for-item="picItem" src="{{ picItem.pic }}" mode="aspectFill"
  111. bindtap="previewImage" data-url="{{ picItem.pic }}"></image>
  112. </view>
  113. <van-cell wx:if="{{ item.goods.goodReputationReply }}" title-class="reputation-cell-reamrk"
  114. title="掌柜回复:{{item.goods.goodReputationReply}}" />
  115. </block>
  116. </van-cell-group>
  117. <van-goods-action wx:if="{{!curGoodsKanjia}}">
  118. <van-goods-action-icon icon="chat-o" text="客服" open-type="contact"
  119. send-message-title="{{goodsDetail.basicInfo.name}}" send-message-img="{{goodsDetail.basicInfo.pic}}"
  120. send-message-path="/packageCps/pages/goods-details/cps-jd?id={{goodsDetail.basicInfo.id}}" show-message-card="{{ true }}" />
  121. <van-goods-action-icon icon="{{faved?'like':'like-o'}}" text="收藏" bind:click="addFav" />
  122. <van-goods-action-button text="立即购买" data-shopType="{{shopType}}"
  123. bind:click="tobuy" />
  124. </van-goods-action>
  125. </scroll-view>
  126. </view>
  127. <block wx:if="{{posterShow}}">
  128. <view class="poster-mask"></view>
  129. <view class="poster">
  130. <canvas class="canvas" style="{{canvasstyle}}" canvas-id="firstCanvas"></canvas>
  131. </view>
  132. <view class="poster-btn">
  133. <button type="primary" size="mini" bindtap='_saveToMobile'> 保存图片 </button>
  134. <button type="warn" size="mini" bindtap='closePop'> 关闭 </button>
  135. </view>
  136. </block>
  137. <template is="apifmLogin" data="{{wxlogin: wxlogin}}" />
  138. <poster id="poster" config="{{posterConfig}}" bind:success="onPosterSuccess" bind:fail="onPosterFail"></poster>
  139. <view wx:if="{{showposterImg}}" class="popup-mask"></view>
  140. <view wx:if="{{showposterImg}}" class="posterImg-box">
  141. <image mode="widthFix" class="posterImg" src="{{posterImg}}"></image>
  142. <view class="btn-create" bindtap="savePosterPic">保存到相册</view>
  143. </view>
  144. <van-popup show="{{ !hideShopPopup }}" round closeable position="bottom"
  145. custom-style="padding-top:48rpx;max-height: 80%;" bind:close="closePopupTap">
  146. <van-card centered price="{{price.priceSale}}" origin-price="{{ price.priceJd ? price.priceJd : '' }}"
  147. title="{{price.skuName}}" thumb="{{ imageDomain }}{{ price.pic }}" />
  148. <van-cell title="购买数量">
  149. <view>
  150. <van-stepper value="{{ buyNumber }}" min="{{ 1 }}" max="{{ 999 }}" bind:change="stepChange" />
  151. </view>
  152. </van-cell>
  153. <van-cell-group wx:if="{{ curAddressData }}" title="配送地址">
  154. <van-cell title="{{curAddressData.linkMan}} {{curAddressData.mobile}}" label="{{curAddressData.address}}" value="更换"
  155. is-link bind:click="selectAddress" />
  156. </van-cell-group>
  157. <van-button wx:if="{{!curAddressData}}" bindtap="selectAddress" type="warning" block>添加收货地址</van-button>
  158. <van-button wx:if="{{curAddressData && !canPurchase}}" type="warning" disabled block>该地区已售罄</van-button>
  159. <van-button wx:if="{{curAddressData && canPurchase && shopType =='addShopCar'}}" bindtap="addShopCar" type="danger"
  160. block>加入购物车</van-button>
  161. <van-button wx:if="{{curAddressData && canPurchase && (shopType =='tobuy' || shopType =='toPingtuan')}}"
  162. data-shopType="{{shopType}}" bindtap="buyNow" type="danger" block>立即购买</van-button>
  163. </van-popup>