goods.wxml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328
  1. <!-- 展示蒙层 显示推广画报 -->
  2. <view class="poster" wx:if="{{myqr_show}}">
  3. <view class="title">
  4. <text>推广文案</text></view>
  5. <view class="ads">
  6. <view style="width:480rpx">{{myqr_ads}}</view>
  7. </view>
  8. <image src="{{myqr_url}}" mode="widthFix" style="width:480rpx" show-menu-by-longpress="true"></image>
  9. <view class="tool">
  10. <view bindtap="posterCopy" style="text-align:right">
  11. <image class="img" style="width:110rpx;height:130rpx" src="/static/images/share/p_copy.png"></image>
  12. </view>
  13. <button open-type='share' class="share-btn">
  14. <image class="img" style="width: 85rpx;height: 127rpx;" src="/static/images/share/p_wx.png"></image>
  15. </button>
  16. <view style="text-align:left">
  17. <image class="img" bindtap="goSaveQrcode" src="/static/images/share/p_save.png"></image>
  18. </view>
  19. </view>
  20. <view style="text-align:center">
  21. <image class="closeImg" bindtap="hidePoster" src="/static/images/share/close.png"></image>
  22. </view>
  23. </view>
  24. <view class="container" style="filter:brightness({{myqr_blur}}%)">
  25. <image src="/static/images/new/isnew.png" wx:if="{{goods.isNew}}" class="isNew"></image>
  26. <swiper class="goodsimgs" indicator-dots="true" autoplay="true" interval="3000" duration="1000">
  27. <swiper-item wx:for="{{goods.picAddress}}" wx:key="*this">
  28. <image src="{{item}}" mode="aspectFill"></image>
  29. </swiper-item>
  30. </swiper>
  31. <!-- 分享
  32. <view class='goods_name'>
  33. <view class='goods_name_left'>{{goods.name}}</view>
  34. <view hidden="{{!canShare}}" class="goods_name_right" bindtap="shareFriendOrCircle">
  35. <image class="img" src="/static/images/share.png" />
  36. </view>
  37. </view>-->
  38. <view class="share-pop-box" hidden="{{!openShare}}">
  39. <view class="share-pop">
  40. <view class="close" bindtap="closeShare">
  41. <van-icon class="icon" name="cross" />
  42. </view>
  43. </view>
  44. </view>
  45. <view class="goods-info">
  46. <view class="c">
  47. <view>
  48. <view class='goods_name'>
  49. <view class='goods_name_left'>{{goods.commodityName}}</view>
  50. </view>
  51. <!-- <text class="desc sub-color" wx:if="{{goods.commodityName}}">{{goods.commodityName}}</text> -->
  52. <view class="price" >
  53. <view class="retailPrice">商品编码:<text class="checked-price">{{goods.spuCode}}</text></view>
  54. <!-- <view class="member-price-tag spread-tag">推广优惠价</view> -->
  55. </view>
  56. <!-- <view class="price" wx:else>
  57. <view class="retailPrice">¥<text class="checked-price">{{checkedSpecPrice}}</text><text
  58. wx:if="{{goods.type=='2'}}"> 起</text></view> -->
  59. <!-- <view class="memberPrice" wx:if="{{goods.memberPrice!=checkedSpecPrice}}">¥{{goods.memberPrice}}</view> -->
  60. <!-- <view class="member-price-tag" wx:if="{{goods.memberPrice!=checkedSpecPrice}}" bindtap="goMemberCenter">会员价</view> -->
  61. <!-- </view> -->
  62. </view>
  63. <!-- 分享商品 -->
  64. <!-- <view hidden="{{!canShare}}" class="goods_name_right" bindtap="shareFriendOrCircle">
  65. <image class="img" src="/static/images/share.png" />
  66. </view> -->
  67. </view>
  68. </view>
  69. <!-- 数量和sku列表 -->
  70. <view class="sku-list">
  71. <view class="sku-title">请输入商品数量:</view>
  72. <view class="spu-number">
  73. <view class="minus" bindtap="minusNumber">-</view>
  74. <input value="{{goosNumber}}" class="goods-number" maxlength="4" type="number" placeholder="" bindinput="bindNumberInput"/>
  75. <view class="add" bindtap="addNumber" >+</view>
  76. </view>
  77. <view class="sku-title">规格选择:</view>
  78. <view >
  79. <label class="radio" wx:for="{{goods.skus}}" wx:key="index">
  80. <view class="sku-item" bindtap="skuSelect" data-id="{{item.id}}" data-stock="{{item.inHouseCount}}">
  81. <view>
  82. <radio
  83. color="#09afff" value="{{item.id}}" checked="{{currentSku==item.id?true:false}}" disabled="{{!isDxk && item.inHouseCount<=0}}"/>
  84. </view>
  85. <view class="sku-center"><text class="sku-name">{{item.propertyValue}} <text class="sku-name" wx:if="{{!isDxk}}">(库存:{{item.inHouseCount}} )</text></text></view>
  86. <view class="sku-price">
  87. 单价:¥<text>{{item.salePrice}}</text>
  88. </view>
  89. </view>
  90. </label>
  91. </view>
  92. </view>
  93. <!-- 商品详情图片 -->
  94. <view hidden="{{!isDetailPic}}" style="height: 4285px;width: 100%;">
  95. <image class="img" style="height: 4285px;width: 100%;" src="{{detailPic}}"></image>
  96. </view>
  97. <!-- <view class="detail">
  98. <import src="/lib/wxParse/wxParse.wxml" />
  99. <template is="wxParse" data="{{wxParseData:goodsDetail.nodes}}" />
  100. </view> -->
  101. <!-- 大家都在看 -->
  102. <view class="related-goods" wx:if="{{relatedGoods.length > 0}}">
  103. <view class="h">
  104. <view class="line"></view>
  105. <text class="title">大家都在看</text>
  106. </view>
  107. <view class="b">
  108. <view class="item" wx:for="{{relatedGoods}}" wx:key="id">
  109. <navigator url="/pages/goods/goods?id={{item.id}}">
  110. <image class="img" src="{{item.picUrl}}" background-size="cover"></image>
  111. <text class="name">{{item.name}}(库存:{{item.inHouseCount}} )</text>
  112. <text class="price">¥{{item.retailPrice}}</text>
  113. </navigator>
  114. </view>
  115. </view>
  116. </view>
  117. </view>
  118. <!-- 规格选择界面 -->
  119. <view class="attr-pop-box" hidden="{{!openshow}}">
  120. <view class="attr-pop">
  121. <view class="close" bindtap="closeAttr">
  122. <van-icon class="icon" name="cross" />
  123. </view>
  124. </view>
  125. </view>
  126. <!-- 规格选择界面 -->
  127. <view class="attr-pop-box" hidden="{{!openAttr}}">
  128. <view class="attr-pop">
  129. <view class="close" bindtap="closeAttr">
  130. <van-icon class="icon" name="cross" />
  131. </view>
  132. <view class="img-info">
  133. <image class="img" src="{{goods.picUrl}}"></image>
  134. <view class="info">
  135. <view class="c">
  136. <view class="p">价格:¥{{checkedSpecPrice}}</view>
  137. <view class="a">{{tmpSpecText}}</view>
  138. </view>
  139. </view>
  140. </view>
  141. <!-- 规格列表 -->
  142. <view class="spec-con">
  143. <view class="spec-item" wx:for="{{specificationList}}" wx:key="name">
  144. <view class="name">{{item.name}}</view>
  145. <view class="values">
  146. <view class="value {{vitem.checked ? 'selected' : ''}}" bindtap="clickSkuValue" wx:for="{{item.valueList}}"
  147. wx:for-item="vitem" wx:key="id" data-value-id="{{vitem.id}}" data-name="{{vitem.specification}}">
  148. {{vitem.value}}</view>
  149. </view>
  150. </view>
  151. <view class="spec-item" wx:if="{{groupon.length > 0}}">
  152. <view class="name">团购立减</view>
  153. <view class="values">
  154. <view class="value {{vitem.checked ? 'selected' : ''}}" bindtap="clickGroupon" wx:for="{{groupon}}"
  155. wx:for-item="vitem" wx:key="{{vitem.id}}" data-value-id="{{vitem.id}}" data-name="{{vitem.specification}}">
  156. ¥{{vitem.discount}} ({{vitem.discountMember}}人)</view>
  157. </view>
  158. </view>
  159. <!-- 数量 -->
  160. <view class="number-item">
  161. <view class="name">数量</view>
  162. <view class="selnum">
  163. <!-- <view class="cut" bindtap="cutNumber">-</view> -->
  164. <input value="{{number}}" class="number" disabled="true" type="number" />
  165. <!-- <view class="add" bindtap="addNumber">+</view> -->
  166. </view>
  167. </view>
  168. </view>
  169. </view>
  170. </view>
  171. <!-- 联系客服
  172. <view class="contact">
  173. <contact-button style="opacity:0;position:absolute;" type="default-dark" session-from="weapp" size="36">
  174. </contact-button>
  175. </view> -->
  176. <!-- 底部按钮 -->
  177. <view class="bottom-btn" style="position:{{myqr_bottom_btn}}">
  178. <!-- <view class="l l-collect" bindtap="addCollectOrNot" wx:if="{{!isGroupon}}">
  179. <view class="collect-wrapper">
  180. <van-icon class="icon" name="star" color="#09afff" wx:if="{{collect}}" size="22px" />
  181. <van-icon class="icon" size="22px" color="#09afff" name="star-o" wx:else />
  182. <text class="jz-color collect-text">收藏</text>
  183. </view>
  184. </view> -->
  185. <view class="l l-kefu">
  186. <!-- bindtap="goCustomerService" -->
  187. <view class="service-wrapper" >
  188. <view class="contact-block">
  189. <van-icon name="service-o" color="#09afff" size="22px" />
  190. </view>
  191. <text class="jz-color">在线客服</text>
  192. </view>
  193. <contact-button class="csr" type="default-dark" style="opacity: 0;position: absolute;z-index: 99999; width: 100rpx;height: 84rpx;top:0;left:0" session-from="weapp" size="27">
  194. </contact-button>
  195. </view>
  196. <view class="l l-cart" bindtap="openCartPage" >
  197. <view class="collect-wrapper box" wx:if="{{!isDxk}}">
  198. <text class="cart-count" wx:if="{{cartGoodsCount>0}}">{{cartGoodsCount}}</text>
  199. <van-icon class="icon" size="22px" color="#09afff" name="cart-o" />
  200. <text class="jz-color collect-text">购物车</text>
  201. </view>
  202. </view>
  203. <view class="c" >
  204. <view bindtap="addToCart" wx:if="{{!isDxk}}" class="add-cart">加入购物车</view>
  205. <view bindtap="addFast" class="buy-now" >立即购买</view>
  206. </view>
  207. <!-- <view class="l l-cart" wx:if="{{!isGroupon}}">
  208. <view class="box" bindtap="openCartPage">
  209. <text class="cart-count" wx:if="{{cartGoodsCount>0}}">{{cartGoodsCount}}</text>
  210. <van-icon class="icon" name="cart-o" />
  211. <text class="txt">购物车</text>
  212. </view>
  213. </view>
  214. <view class="r" bindtap="addToCart" wx:if="{{!soldout}}" wx:if="{{!isGroupon}}">加入购物车</view> -->
  215. <!--
  216. <view class="r" bindtap="copyToHM">
  217. <view class="title">复制链接</view>
  218. <view class="subtitle">去盒马APP下单</view>
  219. </view> -->
  220. <!-- <view class="c" bindtap="addFast" wx:if="{{!soldout||!hasLogin}}">{{isGroupon?'参加团购':'立即预约'}}</view>
  221. <view class="n" wx:if="{{soldout}}">商品已售空</view> -->
  222. <!-- 自购&推广 分享进入有shareId不展示自购推广-->
  223. <!-- (hasLogin&&userInfo.isDis)||(hasLogin&&shareId==0) -->
  224. <!-- <view class="dis-order-wrapper" wx:if="{{hasLogin&&userInfo.isDis&&referee.self>0}}">
  225. <view class="self-order" bindtap="goSelfPay">
  226. <view class="buy-type">自购</view>
  227. <view>立省 {{referee.self}}元</view>
  228. </view>
  229. <view class="spread-order" bindtap="goSpread">
  230. <view class="buy-type jz-color" style="overflow: hidden;">推广</view>
  231. <view class="jz-color" style="overflow: hidden;">最高返 {{referee.share}}元</view>
  232. </view>
  233. </view>
  234. <block wx:else>
  235. <view class="c" bindtap="addFast" wx:if="{{!soldout||!hasLogin}}">{{isGroupon?'参加团购':'立即预约'}}</view>
  236. <view class="n" wx:if="{{soldout}}">商品已售空</view>
  237. </block> -->
  238. </view>
  239. <!-- 自购提示 -->
  240. <van-overlay show="{{ selfPayShow }}">
  241. <view class="overlay-wrapper">
  242. <view class="tips-wrapper">
  243. <view class="tips-top">
  244. <view class="tips-title">立省金额说明</view>
  245. <view>立省金额会以佣金形式发放,请在引荐人中心查收哦</view>
  246. </view>
  247. <view class="notip-again">
  248. <van-checkbox value="{{selfPayChecked}}" shape="square" icon-size="20px" bind:change="onSelfPayChange"
  249. checked-color="#09afff"></van-checkbox>
  250. <text class="user-agree">我已知晓,不再提示</text>
  251. </view>
  252. <view class="tips-bottom">
  253. <view class="cancel-btn" bindtap="cancelSelfPay">取消</view>
  254. <view class="btn-devide"></view>
  255. <view class="repay-btn" bindtap="reSelfPay">继续购买</view>
  256. </view>
  257. </view>
  258. </view>
  259. </van-overlay>
  260. <!-- 推广提示 -->
  261. <van-overlay show="{{spreadPayShow }}">
  262. <view class="overlay-wrapper">
  263. <view class="tips-wrapper">
  264. <view class="tips-top">
  265. <view class="tips-title">推广佣金说明</view>
  266. <view>页面展示推广佣金为预计最高返现金额,实际金额根据购买者团队身份计算,请在引荐人中心查看实际佣金</view>
  267. </view>
  268. <view class="notip-again">
  269. <van-checkbox value="{{spreadPayChecked}}" shape="square" icon-size="20px" bind:change="onSpreadPayChange"
  270. checked-color="#09afff"></van-checkbox>
  271. <text class="user-agree">我已知晓,不再提示</text>
  272. </view>
  273. <view class="tips-bottom">
  274. <view class="cancel-btn" bindtap="cancelSpreadPay">取消</view>
  275. <view class="btn-devide"></view>
  276. <view class="repay-btn" bindtap="reSpread">继续推广</view>
  277. </view>
  278. </view>
  279. </view>
  280. </van-overlay>