index.wxml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353
  1. <view wx:if="{{ active.active_id }}" class="container">
  2. <!-- 富文本组件 -->
  3. <import src="../../../wxParse/wxParse.wxml"></import>
  4. <!-- 滚动容器 -->
  5. <scroll-view class="scroll-container" bindscroll="onScrollEvent" scroll-top="{{ scrollTop }}" scroll-y="true">
  6. <!-- 商品图片 -->
  7. <view class="goods-swiper">
  8. <swiper autoplay="{{ autoplay }}" bindchange="setCurrent" class="banner-box swiper-box" duration="{{duration}}"
  9. indicator-dots="{{indicatorDots}}" interval="{{interval}}" circular="{{true}}">
  10. <swiper-item wx:for="{{ goods.image }}" wx:key="this" catchtap="onPreviewImages" data-index="{{ index }}">
  11. <image class="slide-image" mode="aspectFill" src="{{ item.file_path }}"></image>
  12. </swiper-item>
  13. </swiper>
  14. <view class="banner-num">
  15. <text>{{ currentIndex }}</text>
  16. <text>/</text>
  17. <text>{{ goods.image.length }}</text>
  18. </view>
  19. </view>
  20. <!-- 商品信息 -->
  21. <view class="goods-info m-top20">
  22. <!-- 价格、销量 -->
  23. <view class="info-item info-item__top dis-flex flex-x-between flex-y-end">
  24. <view class="block-left dis-flex flex-y-end">
  25. <view class="active-tag">
  26. <text>限时砍价</text>
  27. </view>
  28. <!-- 底价 -->
  29. <text class="floor-price__samll">¥</text>
  30. <text class="floor-price">{{ active.floor_price }}</text>
  31. <!-- 原价 -->
  32. <text class="original-price">¥{{ goods.goods_sku.goods_price }}</text>
  33. </view>
  34. <view class="block-right dis-flex">
  35. <!-- 销量 -->
  36. <view class="goods-sales">
  37. <text>{{ active.active_sales }}人已砍成</text>
  38. </view>
  39. </view>
  40. </view>
  41. <!-- 标题、分享 -->
  42. <view class="info-item info-item__name dis-flex flex-y-center">
  43. <view class="goods-name flex-box">
  44. <text class="twolist-hidden">{{ goods.goods_name }}</text>
  45. </view>
  46. <view class="goods-share__line"></view>
  47. <view class="goods-share">
  48. <form bindsubmit="onClickShare">
  49. <button formType="submit" class="share-btn dis-flex flex-dir-column">
  50. <text class="share__icon iconfont icon-fenxiang"></text>
  51. <text class="f-24">分享</text>
  52. </button>
  53. </form>
  54. </view>
  55. </view>
  56. <!-- 商品卖点 -->
  57. <view wx:if="{{ goods.selling_point }}" class="info-item info-item_selling-point">
  58. <text>{{ goods.selling_point }}</text>
  59. </view>
  60. <!-- 活动倒计时 -->
  61. <view wx:if="{{ !active.is_end }}" class="info-item info-item_status info-item_countdown dis-flex flex-y-center">
  62. <text class="countdown-icon iconfont icon-naozhong"></text>
  63. <text>距离活动结束</text>
  64. <text class="m-r-10">还剩</text>
  65. <countdown wx:if="{{ countDownTime }}" date="{{ countDownTime }}" />
  66. </view>
  67. <!-- 活动已结束 -->
  68. <view wx:if="{{ active.is_end }}" class="info-item info-item_status info-item_end">
  69. <text class="countdown-icon iconfont icon-naozhong"></text>
  70. <text>砍价活动已结束,下次记得早点来哦~</text>
  71. </view>
  72. </view>
  73. <!-- 选择商品规格 -->
  74. <!-- <view class="goods-choice m-top20 b-f">
  75. <form wx:if="{{ goods.spec_type == 20 }}" bindsubmit="onToggleTrade">
  76. <button class="btn-normal" formType="submit">
  77. <view class="sku-selector dis-flex flex-y-center">
  78. <view class="flex-box f-28">
  79. <text class="col-8">选择:</text>
  80. <text wx:for="{{ goodsMultiSpec.spec_attr }}" wx:key="this">{{ item.group_name }} </text>
  81. </view>
  82. <view class="f-26 col-9 t-r">
  83. <text class="iconfont icon-xiangyoujiantou"></text>
  84. </view>
  85. </view>
  86. </button>
  87. </form>
  88. </view> -->
  89. <!-- 砍价玩法 -->
  90. <view class="bargain-rules top-nav-bar m-top20 b-f">
  91. <form bindsubmit="onToggleRules">
  92. <button formType="submit" class="btn-normal">
  93. <view class="item-title dis-flex">
  94. <view class="block-left flex-box">
  95. <text>砍价玩法</text>
  96. </view>
  97. <view class="block-right">
  98. <text class="show-more col-9">查看规则</text>
  99. </view>
  100. </view>
  101. <!-- 砍价步骤 -->
  102. <view class="rule-simple dis-flex flex-x-around">
  103. <view class="simple-item dis-flex flex-dir-column flex-y-center">
  104. <view class="i-number dis-flex flex-x-center flex-y-center">
  105. <text class="f-30">1</text>
  106. </view>
  107. <view class="i-text f-28">点击砍价</view>
  108. </view>
  109. <view class="simple-item dis-flex flex-dir-column flex-y-center">
  110. <view class="i-number dis-flex flex-x-center flex-y-center">
  111. <text class="f-30">2</text>
  112. </view>
  113. <view class="i-text f-28">找人帮砍</view>
  114. </view>
  115. <view class="simple-item dis-flex flex-dir-column flex-y-center">
  116. <view class="i-number dis-flex flex-x-center flex-y-center">
  117. <text class="f-30">3</text>
  118. </view>
  119. <view class="i-text f-28">砍到最低</view>
  120. </view>
  121. <view class="simple-item dis-flex flex-dir-column flex-y-center">
  122. <view class="i-number dis-flex flex-x-center flex-y-center">
  123. <text class="f-30">4</text>
  124. </view>
  125. <view class="i-text f-28">优惠购买</view>
  126. </view>
  127. </view>
  128. </button>
  129. </form>
  130. </view>
  131. <!-- 商品评价 -->
  132. <view class="goods-comment m-top20 b-f" wx:if="{{ goods.comment_data.length }}">
  133. <view class="item-title dis-flex">
  134. <view class="block-left flex-box">
  135. <text>评价 ({{ goods.comment_data_count }}条)</text>
  136. </view>
  137. <view class="block-right">
  138. <text catchtap="onTargetToComment" class="show-more col-9">查看更多</text>
  139. <text class="iconfont icon-xiangyoujiantou"></text>
  140. </view>
  141. </view>
  142. <!-- 评论列表 -->
  143. <view class="comment-list">
  144. <view class="comment-item" wx:for="{{ goods.comment_data }}" wx:key="this">
  145. <view class="comment-item_row dis-flex flex-y-center">
  146. <view class="user-info dis-flex flex-y-center">
  147. <image class="avatar" src="{{ item.user.avatarUrl }}"></image>
  148. <text class="user-name">{{ item.user.nickName }}</text>
  149. </view>
  150. <view class="star-rating">
  151. <text class="star-icon iconfont icon-shoucang active"></text>
  152. <block wx:if="{{ item.score < 30 }}">
  153. <text class="star-icon iconfont icon-shoucang active"></text>
  154. <text class="star-icon iconfont icon-shoucang active"></text>
  155. </block>
  156. <block wx:if="{{ item.score < 20 }}">
  157. <text class="star-icon iconfont icon-shoucang active"></text>
  158. <text class="star-icon iconfont icon-shoucang active"></text>
  159. </block>
  160. </view>
  161. </view>
  162. <view class="goods-comment-cont m-top20">
  163. <text class="f-26 twolist-hidden">{{ item.content }}</text>
  164. </view>
  165. <view class="f-22 col-9 m-top10">{{ item.create_time }}</view>
  166. </view>
  167. </view>
  168. </view>
  169. <!-- 商品描述 -->
  170. <view class="goods-content m-top20">
  171. <view class="item-title b-f">
  172. <text>商品描述</text>
  173. </view>
  174. <block wx:if="{{ goods.content != '' }}">
  175. <view class="goods-content__detail b-f">
  176. <template is="wxParse" data="{{ wxParseData:content.nodes }}"></template>
  177. </view>
  178. </block>
  179. <block wx:else>
  180. <view class="yoshop-notcont">
  181. <text class="iconfont icon-wushuju"></text>
  182. <text class="cont">亲,暂无商品描述</text>
  183. </view>
  184. </block>
  185. </view>
  186. </scroll-view>
  187. <!-- 底部选项卡 -->
  188. <view class="footer-fixed">
  189. <view class="footer-container dis-flex">
  190. <!-- 导航图标 -->
  191. <view class="foo-item-fast dis-flex flex-x-center flex-y-center">
  192. <form bindsubmit="onTargetHome">
  193. <button class="btn-normal" formType="submit">
  194. <view class="fast-item fast-item_home">
  195. <view class="fast-icon">
  196. <text class="iconfont icon-shouye"></text>
  197. </view>
  198. <view class="fast-text">
  199. <text>首页</text>
  200. </view>
  201. </view>
  202. </button>
  203. </form>
  204. <button class="btn-normal" open-type="contact">
  205. <view class="fast-item">
  206. <view class="fast-icon">
  207. <text class="iconfont icon-kefu1"></text>
  208. </view>
  209. <view class="fast-text">
  210. <text>客服</text>
  211. </view>
  212. </view>
  213. </button>
  214. </view>
  215. <!-- 操作按钮 -->
  216. <view class="foo-item-trigger flex-box">
  217. <form bindsubmit="onSubmit">
  218. <button wx:if="{{ active.is_start && !active.is_end }}" class="opt-btn btn-main btn-normal" formType="submit">
  219. <text>{{ is_partake ? '继续砍价' : '立即砍价' }}</text>
  220. </button>
  221. <button wx:else class="opt-btn btn-gray btn-normal">
  222. <text>{{ active.is_end ? '活动已结束' : '活动未开启' }}</text>
  223. </button>
  224. </form>
  225. </view>
  226. </view>
  227. </view>
  228. <!-- 分享按钮 -->
  229. <zan-actionsheet show="{{ share.show }}" actions="{{ share.actions }}" cancel-text="{{ share.cancelText }}"
  230. cancel-with-mask="{{ share.cancelWithMask }}" bind:cancel="onCloseShare" bind:actionclick="onClickShareItem"
  231. mask-class="tiny" />
  232. <!-- 商品海报 弹出层 -->
  233. <zan-popup show="{{ share.showPopup }}" bindclose="onTogglePopup">
  234. <view class="pop-poster pop-example__container">
  235. <!-- 关闭按钮 -->
  236. <view class="pop-close dis-flex flex-x-center flex-y-center" catchtap="onTogglePopup">
  237. <text class="iconfont icon-shanchu f-30 col-9"></text>
  238. </view>
  239. <form bindsubmit="onSavePoster">
  240. <view class="poster__image">
  241. <image mode="widthFix" src="{{ qrcode }}"></image>
  242. </view>
  243. <view class="poster__tips m-top10 t-c">
  244. </view>
  245. <view class="padding-box m-top10 profile-btn">
  246. <button formType="submit">保存图片</button>
  247. </view>
  248. </form>
  249. </view>
  250. </zan-popup>
  251. <!-- 确认购买弹窗 -->
  252. <zan-popup show="{{ showBottomPopup }}" type="bottom" bindclose="onToggleTrade">
  253. <view class="popup__trade">
  254. <!-- 关闭按钮 -->
  255. <view class="trade-close dis-flex flex-x-center flex-y-center" catchtap="onToggleTrade">
  256. <text class="iconfont icon-close f-26"></text>
  257. </view>
  258. <!-- 主体信息 -->
  259. <view class="trade-main">
  260. <view class="goods-info dis-flex">
  261. <!-- 图片名称 -->
  262. <view class="goods-image" catchtap="onPreviewSkuImage">
  263. <image src="{{ skuCoverImage }}"></image>
  264. </view>
  265. <view class="block-right flex-box">
  266. <view class="block-item dis-flex flex-y-end">
  267. <!-- 商品价 -->
  268. <view class="goods-price col-m">
  269. <text class="f-26">¥</text>
  270. <text class="f-36">{{ active.floor_price }}</text>
  271. </view>
  272. <!-- 划线价 -->
  273. <view class="line-price" wx:if="{{ line_price > 0 }}">
  274. <text>{{ goods.goods_sku.goods_price }}</text>
  275. </view>
  276. </view>
  277. <view class="goods-stock dis-flex">
  278. <text class="flex-box f-26 col-7">库存:{{stock_num}}</text>
  279. </view>
  280. </view>
  281. </view>
  282. <!-- 规格列表 -->
  283. <view class="goods-attr">
  284. <!-- 滚动容器 -->
  285. <scroll-view class="goods-attr--scroll" scroll-y="{{ true }}">
  286. <view class="group-item" wx:for="{{ goodsMultiSpec.spec_attr }}" wx:for-item="attr" wx:for-index="attr_idx"
  287. wx:key="this">
  288. <view class="tips-text" data-id="{{ attr.group_id }}">{{ attr.group_name }}</view>
  289. <view class="spec-item {{ item.checked ? 'cur' : '' }}" wx:for="{{ attr.spec_items }}"
  290. wx:for-index="item_idx" wx:key="this" data-attr-idx="{{ attr_idx }}" data-item-idx="{{ item_idx }}"
  291. catchtap="onSwitchSpec">
  292. {{ item.spec_value }}
  293. </view>
  294. </view>
  295. </scroll-view>
  296. </view>
  297. <!-- 购买数量 -->
  298. <!-- <view class="goods-number">
  299. <view class="tips-text">
  300. <text>购买数量</text>
  301. </view>
  302. <view class="select-number">
  303. <form bindsubmit="onDecGoodsNumber">
  304. <button formType="submit" class="default {{ goods_num > 1 ? '' : 'disabled' }}" type="default">-</button>
  305. </form>
  306. <input bindinput="onInputGoodsNum" type="number" value="{{ goods_num }}"></input>
  307. <form bindsubmit="onIncGoodsNumber">
  308. <button formType="submit" class="default" type="default">+</button>
  309. </form>
  310. </view>
  311. </view> -->
  312. </view>
  313. <!-- 底部操作栏 -->
  314. <view class="footer-fixed f-30">
  315. <view wx:if="{{ stock_num > 0 }}" class="flex-box">
  316. <form bindsubmit="onSubmit2">
  317. <button class="opt-btn btn-main btn-normal" formType="submit">
  318. <text>确定</text>
  319. </button>
  320. </form>
  321. </view>
  322. <view class="flex-box opt-btn btn-gray" wx:else>暂无现货</view>
  323. </view>
  324. </view>
  325. </zan-popup>
  326. <!-- 砍价规则 -->
  327. <zan-dialog id="zan-base-dialog"></zan-dialog>
  328. <!-- 快捷导航 -->
  329. <shortcut bottom="120rpx"></shortcut>
  330. <!-- 返回顶部 -->
  331. <view catchtap="onScrollTop" class="widget-goTop" wx:if="{{ showTopWidget }}">
  332. <text class="iconfont icon-fanhuidingbu"></text>
  333. </view>
  334. </view>