goods.wxml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389
  1. <!-- 展示蒙层 显示推广画报 -->
  2. <view class="poster" wx:if="{{myqr_show}}">
  3. <view class="title">
  4. <text>推广文案</text>
  5. </view>
  6. <view class="ads">
  7. <view style="width:480rpx">{{myqr_ads}}</view>
  8. </view>
  9. <image src="{{myqr_url}}" mode="widthFix" style="width:480rpx" show-menu-by-longpress="true"></image>
  10. <view class="tool">
  11. <view bindtap="posterCopy" style="text-align:right">
  12. <image class="img" style="width:110rpx;height:130rpx" src="/static/images/share/p_copy.png"></image>
  13. </view>
  14. <button open-type='share' class="share-btn">
  15. <image class="img" style="width: 85rpx;height: 127rpx;" src="/static/images/share/p_wx.png"></image>
  16. </button>
  17. <view style="text-align:left">
  18. <image class="img" bindtap="goSaveQrcode" src="/static/images/share/p_save.png"></image>
  19. </view>
  20. </view>
  21. <view style="text-align:center">
  22. <image class="closeImg" bindtap="hidePoster" src="/static/images/share/close.png"></image>
  23. </view>
  24. </view>
  25. <view class="container" style="filter:brightness({{myqr_blur}}%)">
  26. <image src="/static/images/new/isnew.png" wx:if="{{goods.isNew}}" class="isNew"></image>
  27. <swiper class="goodsimgs" indicator-dots="true" autoplay="true" interval="3000" duration="1000">
  28. <swiper-item wx:for="{{goods.gallery}}" wx:key="*this">
  29. <image src="{{item}}" mode="aspectFill"></image>
  30. </swiper-item>
  31. </swiper>
  32. <!-- 分享
  33. <view class='goods_name'>
  34. <view class='goods_name_left'>{{goods.name}}</view>
  35. <view hidden="{{!canShare}}" class="goods_name_right" bindtap="shareFriendOrCircle">
  36. <image class="img" src="/static/images/share.png" />
  37. </view>
  38. </view>-->
  39. <view class="share-pop-box" hidden="{{!openShare}}">
  40. <view class="share-pop">
  41. <view class="close" bindtap="closeShare">
  42. <van-icon class="icon" name="cross" />
  43. </view>
  44. <!-- <view class='share-info'>
  45. <button class="sharebtn" open-type="share" wx:if="{{!isGroupon}}">
  46. <image class='sharebtn_image' src='/static/images/wechat.png'></image>
  47. <view class='sharebtn_text'>分享给好友</view>
  48. </button>
  49. <button class="savesharebtn" open-type="openSetting" bindopensetting="handleSetting" wx:if="{{(!isGroupon) && (!canWrite)}}">
  50. <image class='sharebtn_image' src='/static/images/friend.png'></image>
  51. <view class='sharebtn_text'>发朋友圈1</view>
  52. </button>
  53. <button class="savesharebtn" bindtap="saveShare" wx:if="{{!isGroupon && canWrite}}">
  54. <image class='sharebtn_image' src='/static/images/friend.png'></image>
  55. <view class='sharebtn_text'>发朋友圈</view>
  56. </button>
  57. </view>-->
  58. </view>
  59. </view>
  60. <view class="goods-info">
  61. <!-- 活动商品展示的样式 -->
  62. <view wx:if="{{activited}}" class="activity">
  63. <view style="display: flex;flex-direction: row;justify-content: space-between;">
  64. <view class="img">限时活动</view>
  65. <view class="activityDay">
  66. <image src="https://7a68-zhaijieshi-3guecm78383ca692-1307626841.tcb.qcloud.la/activity/clock.png"></image>
  67. <text>距离活动仅剩{{activityDay}}天</text></view>
  68. </view>
  69. <view style="display: flex;justify-content: space-between;">
  70. <view style="display: flex;">
  71. <view class="activityPrice">¥<text>{{activityPrice}}</text></view>
  72. <view class="activityCounterPrice">原价¥<text>{{goods.counterPrice}}</text></view>
  73. </view>
  74. <view class="activityTime">
  75. <view>{{activityHour}}</view><text>:</text>
  76. <view>{{activityMinute}}</view><text>:</text>
  77. <view>{{activitySecond}}</view>
  78. </view>
  79. </view>
  80. </view>
  81. <!-- 非活动商品的样式 -->
  82. <view class="c">
  83. <view style="display: flex;flex-direction: column;">
  84. <view wx:if="{{!activited}}" class="price">
  85. <view class="retailPrice">¥<text class="checked-price">{{goods.retailPrice}}</text> </view>
  86. <view wx:if="{{goods.counterPrice!=goods.retailPrice}}" class="counterPrice">原价¥<text>{{goods.counterPrice}}</text></view>
  87. </view>
  88. <view class='goods_name'>
  89. <!-- <image wx:if="{{activited}}" style="width: 79rpx;height:32rpx;margin-right: 4rpx;" src="https://7a68-zhaijieshi-3guecm78383ca692-1307626841.tcb.qcloud.la/activity/618.png"></image> -->
  90. <view class='goods_name_left'>{{goods.name}}</view>
  91. </view>
  92. <text class="desc sub-color" wx:if="{{goods.brief}}">{{goods.brief}}</text>
  93. <!-- <view class="price" wx:else>
  94. <view class="retailPrice">¥<text class="checked-price">{{checkedSpecPrice}}</text><text
  95. wx:if="{{goods.type=='2'}}"> 起</text></view>
  96. <view class="memberPrice" wx:if="{{goods.memberPrice!=checkedSpecPrice}}">¥{{goods.memberPrice}}</view>
  97. <view class="member-price-tag" wx:if="{{goods.memberPrice!=checkedSpecPrice}}" bindtap="goMemberCenter">会员价</view>
  98. </view> -->
  99. </view>
  100. <!-- 分享商品 -->
  101. <!-- <view hidden="{{!canShare}}" class="goods_name_right" bindtap="shareFriendOrCircle">
  102. <image class="img" src="/static/images/share.png" />
  103. </view> -->
  104. </view>
  105. </view>
  106. <!-- <view class="section-nav section-attr" bindtap="switchAttrPop">
  107. <view class="t">{{checkedSpecText}}</view>
  108. <van-icon class="i" name="arrow" />
  109. </view> -->
  110. <!-- <view class="comments" wx:if="{{comment.count > 0}}">
  111. <view class="h">
  112. <navigator url="/pages/comment/comment?valueId={{goods.id}}&type=0">
  113. <text class="t">评价({{comment.count > 999 ? '999+' : comment.count}})</text>
  114. <view class="i">
  115. 查看全部
  116. <van-icon name="arrow" />
  117. </view>
  118. </navigator>
  119. </view>
  120. <view class="b">
  121. <view class="item" wx:for="{{comment.data}}" wx:key="id">
  122. <view class="info">
  123. <view class="user">
  124. <image src="{{item.avatar}}"></image>
  125. <text>{{item.nickname}}</text>
  126. </view>
  127. <view class="time">{{item.addTime}}</view>
  128. </view>
  129. <view class="content">
  130. {{item.content}}
  131. </view>
  132. <view class="imgs" wx:if="{{item.picList.length > 0}}">
  133. <image class="img" wx:for="{{item.picList}}" wx:key="*this" wx:for-item="iitem" src="{{iitem}} "></image>
  134. </view>
  135. <view class="customer-service" wx:if="{{item.adminContent}}">
  136. <text class="u">商家回复:</text>
  137. <text class="c">{{item.adminContent}}</text>
  138. </view>
  139. </view>
  140. </view>
  141. </view>-->
  142. <!-- <view class="goods-attr">
  143. <view class="t">商品参数</view>
  144. <view class="l">
  145. <view class="item" wx:for="{{attribute}}" wx:key="name">
  146. <text class="left">{{item.attribute}}</text>
  147. <text class="right">{{item.value}}</text>
  148. </view>
  149. </view>
  150. </view> -->
  151. <view class="detail">
  152. <import src="/lib/wxParse/wxParse.wxml" />
  153. <template is="wxParse" data="{{wxParseData:goodsDetail.nodes}}" />
  154. </view>
  155. <!-- <view class="common-problem">
  156. <view class="h">
  157. <view class="line"></view>
  158. <text class="title">常见问题</text>
  159. </view>
  160. <view class="b">
  161. <view class="item" wx:for="{{issueList}}" wx:key="id">
  162. <view class="question-box">
  163. <text class="spot"></text>
  164. <text class="question">{{item.question}}</text>
  165. </view>
  166. <view class="answer">
  167. {{item.answer}}
  168. </view>
  169. </view>
  170. </view>
  171. </view> -->
  172. <!-- 大家都在看 -->
  173. <view class="related-goods" wx:if="{{relatedGoods.length > 0}}">
  174. <view class="h">
  175. <view class="line"></view>
  176. <text class="title">大家都在看</text>
  177. </view>
  178. <view class="b">
  179. <view class="item" wx:for="{{relatedGoods}}" wx:key="id">
  180. <navigator url="/pages/goods/goods?id={{item.id}}">
  181. <image class="img" src="{{item.picUrl}}" background-size="cover"></image>
  182. <text class="name">{{item.name}}</text>
  183. <text class="price">¥{{item.retailPrice}}</text>
  184. </navigator>
  185. </view>
  186. </view>
  187. </view>
  188. </view>
  189. <!-- 规格选择界面 -->
  190. <view class="attr-pop-box" hidden="{{!openshow}}">
  191. <view class="attr-pop">
  192. <view class="close" bindtap="closeAttr">
  193. <van-icon class="icon" name="cross" />
  194. </view>
  195. </view>
  196. </view>
  197. <!-- 规格选择界面 -->
  198. <view class="attr-pop-box" hidden="{{!openAttr}}">
  199. <view class="attr-pop">
  200. <view class="close" bindtap="closeAttr">
  201. <van-icon class="icon" name="cross" />
  202. </view>
  203. <view class="img-info">
  204. <image class="img" src="{{goods.picUrl}}"></image>
  205. <view class="info">
  206. <view class="c">
  207. <view class="p">价格:¥{{checkedSpecPrice}}</view>
  208. <view class="a">{{tmpSpecText}}</view>
  209. </view>
  210. </view>
  211. </view>
  212. <!-- 规格列表 -->
  213. <view class="spec-con">
  214. <view class="spec-item" wx:for="{{specificationList}}" wx:key="name">
  215. <view class="name">{{item.name}}</view>
  216. <view class="values">
  217. <view class="value {{vitem.checked ? 'selected' : ''}}" bindtap="clickSkuValue" wx:for="{{item.valueList}}"
  218. wx:for-item="vitem" wx:key="id" data-value-id="{{vitem.id}}" data-name="{{vitem.specification}}">
  219. {{vitem.value}}</view>
  220. </view>
  221. </view>
  222. <view class="spec-item" wx:if="{{groupon.length > 0}}">
  223. <view class="name">团购立减</view>
  224. <view class="values">
  225. <view class="value {{vitem.checked ? 'selected' : ''}}" bindtap="clickGroupon" wx:for="{{groupon}}"
  226. wx:for-item="vitem" wx:key="{{vitem.id}}" data-value-id="{{vitem.id}}" data-name="{{vitem.specification}}">
  227. ¥{{vitem.discount}} ({{vitem.discountMember}}人)</view>
  228. </view>
  229. </view>
  230. <!-- 数量 -->
  231. <view class="number-item">
  232. <view class="name">数量</view>
  233. <view class="selnum">
  234. <!-- <view class="cut" bindtap="cutNumber">-</view> -->
  235. <input value="{{number}}" class="number" disabled="true" type="number" />
  236. <!-- <view class="add" bindtap="addNumber">+</view> -->
  237. </view>
  238. </view>
  239. </view>
  240. </view>
  241. </view>
  242. <!-- 联系客服
  243. <view class="contact">
  244. <contact-button style="opacity:0;position:absolute;" type="default-dark" session-from="weapp" size="36">
  245. </contact-button>
  246. </view> -->
  247. <!-- 底部按钮 -->
  248. <view class="bottom-btn" style="position:{{myqr_bottom_btn}}">
  249. <view class="l l-collect" bindtap="addCollectOrNot" wx:if="{{!isGroupon}}">
  250. <view class="collect-wrapper">
  251. <van-icon class="icon" name="star" color="#09afff" wx:if="{{collect}}" size="22px" />
  252. <van-icon class="icon" size="22px" color="#09afff" name="star-o" wx:else />
  253. <text class="jz-color collect-text">收藏</text>
  254. </view>
  255. </view>
  256. <view class="l l-kefu">
  257. <view class="service-wrapper" bindtap="goCustomerService">
  258. <view class="contact-block">
  259. <!-- <contact-button style="opacity:0;position:absolute; left:16rpx; top:0rpx;" type="default-dark"
  260. session-from="weapp" size="44">
  261. </contact-button> -->
  262. <van-icon name="service-o" color="#09afff" size="22px" />
  263. </view>
  264. <text class="jz-color">在线客服</text>
  265. </view>
  266. </view>
  267. <!-- <view class="l l-cart" wx:if="{{!isGroupon}}">
  268. <view class="box" bindtap="openCartPage">
  269. <text class="cart-count" wx:if="{{cartGoodsCount>0}}">{{cartGoodsCount}}</text>
  270. <van-icon class="icon" name="cart-o" />
  271. <text class="txt">购物车</text>
  272. </view>
  273. </view> -->
  274. <!-- <view class="r" bindtap="addToCart" wx:if="{{!soldout}}" wx:if="{{!isGroupon}}">加入购物车</view> -->
  275. <!-- <view class="r" bindtap="copyToHM">
  276. <view class="title">复制链接</view>
  277. <view class="subtitle">去盒马APP下单</view>
  278. </view> -->
  279. <!-- <view class="c" bindtap="addFast" wx:if="{{!soldout||!hasLogin}}">{{isGroupon?'参加团购':'立即预约'}}</view>
  280. <view class="n" wx:if="{{soldout}}">商品已售空</view> -->
  281. <!-- 自购&推广 分享进入有shareId不展示自购推广-->
  282. <!-- (hasLogin&&userInfo.isDis)||(hasLogin&&shareId==0)
  283. <view class="dis-order-wrapper" wx:if="{{hasLogin&&userInfo.isDis&&referee.self>0}}">
  284. <view class="self-order" bindtap="goSelfPay">
  285. <view class="buy-type">自购</view>
  286. <view>立省 {{referee.self}}元</view>
  287. </view>
  288. <view class="spread-order" bindtap="goSpread">
  289. <view class="buy-type jz-color" style="overflow: hidden;">推广</view>
  290. <view class="jz-color" style="overflow: hidden;">最高返 {{referee.share}}元</view>
  291. </view>
  292. </view>
  293. <block wx:else>
  294. <view class="c" bindtap="addFast" wx:if="{{!soldout||!hasLogin}}">{{isGroupon?'参加团购':'立即预约'}}</view>
  295. <view class="n" wx:if="{{soldout}}">商品已售空</view>
  296. </block>-->
  297. <view class="dis-order-wrapper" wx:if="{{goods.type==0||goods.type==3}}">
  298. <view class="self-order" data-type='0' bindtap="addFast">
  299. <view class="buy-type">先买后约</view>
  300. </view>
  301. <view class="spread-order" data-type='1' bindtap="addFast">
  302. <view class="buy-type jz-color" style="overflow: hidden;">立即预约</view>
  303. </view>
  304. </view>
  305. <block wx:elif="{{goods.type==6}}">
  306. <view class="c" bindtap="addFast" data-type='1' wx:if="{{!soldout||!hasLogin}}">立即购买</view>
  307. </block>
  308. <block wx:else>
  309. <view class="c" bindtap="addFast" data-type='1' wx:if="{{!soldout||!hasLogin}}">立即预约</view>
  310. </block>
  311. </view>
  312. <!-- 自购提示 -->
  313. <van-overlay show="{{ selfPayShow }}">
  314. <view class="overlay-wrapper">
  315. <view class="tips-wrapper">
  316. <view class="tips-top">
  317. <view class="tips-title">立省金额说明</view>
  318. <view>立省金额会以佣金形式发放,请在引荐人中心查收哦</view>
  319. </view>
  320. <view class="notip-again">
  321. <van-checkbox value="{{selfPayChecked}}" shape="square" icon-size="20px" bind:change="onSelfPayChange"
  322. checked-color="#09afff"></van-checkbox>
  323. <text class="user-agree">我已知晓,不再提示</text>
  324. </view>
  325. <view class="tips-bottom">
  326. <view class="cancel-btn" bindtap="cancelSelfPay">取消</view>
  327. <view class="btn-devide"></view>
  328. <view class="repay-btn" bindtap="reSelfPay">继续购买</view>
  329. </view>
  330. </view>
  331. </view>
  332. </van-overlay>
  333. <!-- 推广提示 -->
  334. <van-overlay show="{{spreadPayShow }}">
  335. <view class="overlay-wrapper">
  336. <view class="tips-wrapper">
  337. <view class="tips-top">
  338. <view class="tips-title">推广佣金说明</view>
  339. <view>页面展示推广佣金为预计最高返现金额,实际金额根据购买者团队身份计算,请在引荐人中心查看实际佣金</view>
  340. </view>
  341. <view class="notip-again">
  342. <van-checkbox value="{{spreadPayChecked}}" shape="square" icon-size="20px" bind:change="onSpreadPayChange"
  343. checked-color="#09afff"></van-checkbox>
  344. <text class="user-agree">我已知晓,不再提示</text>
  345. </view>
  346. <view class="tips-bottom">
  347. <view class="cancel-btn" bindtap="cancelSpreadPay">取消</view>
  348. <view class="btn-devide"></view>
  349. <view class="repay-btn" bindtap="reSpread">继续推广</view>
  350. </view>
  351. </view>
  352. </view>
  353. </van-overlay>