index.wxml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375
  1. <import src="../../../wxParse/wxParse.wxml"></import>
  2. <scroll-view bindscroll="scroll" scroll-top="{{scrollTop}}" scroll-y="true"
  3. style="position:absolute; top:0; left:0; right:0; bottom:0;">
  4. <view class="container" wx:if="{{detail.goods_id}}">
  5. <view class="swiper">
  6. <swiper autoplay="{{autoplay}}" bindchange="setCurrent" class="banner-box swiper-box" duration="{{duration}}"
  7. indicator-dots="{{indicatorDots}}" interval="{{interval}}" circular="{{true}}">
  8. <swiper-item wx:for="{{detail.image}}" wx:key="this" catchtap="onPreviewImages" data-index="{{ index }}">
  9. <image class="slide-image" mode="aspectFill" src="{{item.file_path}}"></image>
  10. </swiper-item>
  11. </swiper>
  12. <view class="banner-num">
  13. <text>{{ currentIndex }}</text>
  14. <text>/{{ detail.image.length }}</text>
  15. </view>
  16. </view>
  17. <!-- 团购提醒 -->
  18. <view class="goods-attention dis-flex flex-y-center">
  19. <!-- 商品价格 -->
  20. <view class="goods-price">
  21. <text class="price-currency f-26">¥</text>
  22. <text class="price-text">{{ sharing_price }}</text>
  23. </view>
  24. <view class="goods-message">
  25. <view class="line-price" wx:if="{{line_price > 0}}">
  26. <text class="f-22">¥</text>
  27. <text class="f-26">{{ line_price }}</text>
  28. </view>
  29. <view class="dis-flex flex-y-center">
  30. <view class="in-tag f-24">团购中</view>
  31. <view class="in-txt f-24">
  32. <text></text>{{ detail.goods_sales }}人已参团</view>
  33. </view>
  34. </view>
  35. </view>
  36. <view class="goods-name b-f">
  37. <!-- 商品名称 -->
  38. <view class="dis-flex flex-y-center">
  39. <view class="flex-box dis-flex flex-dir-column">
  40. <view class="goods-title">
  41. <view class="title f-30 twolist-hidden">
  42. <text class="col-m f-28"> [{{ detail.people }}人团] </text>
  43. <text>{{ detail.goods_name }}</text>
  44. </view>
  45. </view>
  46. </view>
  47. <!-- 分享按钮 -->
  48. <view class="goods__share">
  49. <form bindsubmit="onClickShare" report-submit="true">
  50. <button formType="submit" class="btn-normal dis-flex flex-dir-column">
  51. <text class="share__icon iconfont icon-fenxiang"></text>
  52. <text class="f-24">分享</text>
  53. </button>
  54. </form>
  55. </view>
  56. </view>
  57. <!-- 商品卖点 -->
  58. <view class="goods-selling-point">
  59. <text class="f-24">{{ detail.selling_point }}</text>
  60. </view>
  61. </view>
  62. <!-- 选择商品规格 -->
  63. <form wx:if="{{ goodsMultiSpec.spec_attr }}" bindsubmit="onToggleTrade" report-submit>
  64. <button class="btn-normal" formType="submit">
  65. <view class="sku-selector cont-box b-f m-top20 dis-flex flex-y-center">
  66. <view class="flex-box f-28">
  67. <text class="col-9">选择:</text>
  68. <text wx:for="{{ goodsMultiSpec.spec_attr }}" wx:key="this">{{ item.group_name }} </text>
  69. </view>
  70. <view class="f-26 col-9 t-r">
  71. <text class="iconfont icon-xiangyoujiantou"></text>
  72. </view>
  73. </view>
  74. </button>
  75. </form>
  76. <!-- 商品评价 -->
  77. <view class="goods-comment" wx:if="{{ detail.comment_data.length }}">
  78. <view class="cont-box b-f goods-property-box m-top20">
  79. <text class="col-3 f-30">评价 ({{ detail.comment_data_count }}条)</text>
  80. <form bindsubmit="onTargetToComment" report-submit="true" class="comment-num">
  81. <button formType="submit" class="btn-normal">
  82. <text class="f-28">查看更多</text>
  83. </button>
  84. </form>
  85. <view class="goods-property-jianTou">
  86. <text class="iconfont icon-xiangyoujiantou user-orderJtou" style="margin-top:0;"></text>
  87. </view>
  88. </view>
  89. <view class="goods-comment-box b-f" wx:for="{{ detail.comment_data }}" wx:key="this">
  90. <view class="cont-box goods-comment-box b-t b-f b-b">
  91. <view class="dis-flex">
  92. <view class="user">
  93. <text class="user_name f-26">{{ item.user.nickName }}</text>
  94. </view>
  95. <view class="com_xing">
  96. <text class="iconfont icon-shoucang active"></text>
  97. <block wx:if="{{ item.score < 30 }}">
  98. <text class="iconfont icon-shoucang active"></text>
  99. <text class="iconfont icon-shoucang active"></text>
  100. </block>
  101. <block wx:if="{{ item.score < 20 }}">
  102. <text class="iconfont icon-shoucang active"></text>
  103. <text class="iconfont icon-shoucang active"></text>
  104. </block>
  105. </view>
  106. </view>
  107. <view class="goods-comment-cont m-top20">
  108. <text class="f-26 twolist-hidden">{{ item.content }}</text>
  109. </view>
  110. <view class="f-22 col-9 m-top10">{{ item.create_time }}</view>
  111. </view>
  112. </view>
  113. </view>
  114. <!-- 进行中的团购 -->
  115. <view class="top-nav-bar m-top20 b-f" wx:if="{{ activeList.length }}">
  116. <view class="top-nav dis-flex flex-x-between">
  117. <text>进行中的团购</text>
  118. <!-- <text class="col-9">更多团购 <text class="iconfont icon-xiangyoujiantou"></text> </text> -->
  119. </view>
  120. <!-- 进行中的团购-内容部分 -->
  121. <view class="corwd" wx:for="{{ activeList }}" wx:key="this" catchtap="onTargetActive"
  122. data-id="{{ item.active_id }}">
  123. <view class="corwd_people">
  124. <!-- 进行中的团购-头像 -->
  125. <view class="">
  126. <image src="{{ item.user.avatarUrl }}" class="corwd_people_images"></image>
  127. </view>
  128. <!-- 进行中的团购-名称 -->
  129. <text class="onelist-hidden">{{ item.user.nickName }}</text>
  130. </view>
  131. <view class="corwd_time">
  132. <view class="corwd_time_text">
  133. <!-- 进行中的团购-开团人数 -->
  134. <view class="corwd_time_title onelist-hidden">
  135. <text>还差</text>
  136. <text>{{ item.people - item.actual_people }}</text>
  137. <text>人成团</text>
  138. </view>
  139. <!-- 进行中的团购-倒计时 -->
  140. <view class="corwd_time_number col-9 onelist-hidden">
  141. <text class="prefix">剩余</text>
  142. <countdown date="{{ item.end_time.text }}" separator="colon" style="text" />
  143. </view>
  144. <!-- <text
  145. class="corwd_time_number col-9 onelist-hidden">剩余{{ countDownList[index].day }}天{{ countDownList[index].hou }}:{{ countDownList[index].min }}:{{ countDownList[index].sec }}</text> -->
  146. </view>
  147. <!-- 进行中的团购-按钮 -->
  148. <button>去参团</button>
  149. </view>
  150. </view>
  151. </view>
  152. <!-- 拼团玩法 -->
  153. <view class="rule-nav top-nav-bar m-top20 b-f">
  154. <form bindsubmit="onToggleRules" report-submit="true">
  155. <button formType="submit" class="btn-normal">
  156. <view class="top-nav dis-flex flex-x-between">
  157. <text>拼团玩法</text>
  158. <text class="f-25 col-9">查看规则</text>
  159. </view>
  160. <!-- 拼团步骤 -->
  161. <view class="rule-simple dis-flex flex-x-around">
  162. <view class="simple-item dis-flex flex-dir-column flex-y-center">
  163. <view class="i-number dis-flex flex-x-center flex-y-center">
  164. <text class="f-30">1</text>
  165. </view>
  166. <view class="i-text f-28">选择商品</view>
  167. </view>
  168. <view class="simple-item dis-flex flex-dir-column flex-y-center">
  169. <view class="i-number dis-flex flex-x-center flex-y-center">
  170. <text class="f-30">2</text>
  171. </view>
  172. <view class="i-text f-28">开团/参团</view>
  173. </view>
  174. <view class="simple-item dis-flex flex-dir-column flex-y-center">
  175. <view class="i-number dis-flex flex-x-center flex-y-center">
  176. <text class="f-30">3</text>
  177. </view>
  178. <view class="i-text f-28">邀请好友</view>
  179. </view>
  180. <view class="simple-item dis-flex flex-dir-column flex-y-center">
  181. <view class="i-number dis-flex flex-x-center flex-y-center">
  182. <text class="f-30">4</text>
  183. </view>
  184. <view class="i-text f-28">人满成团</view>
  185. </view>
  186. </view>
  187. </button>
  188. </form>
  189. </view>
  190. <!-- 商品描述 -->
  191. <view class="p-bottom">
  192. <view class="top-nav m-top20 b-f b-b">
  193. <view class="top-nav-bar">商品描述</view>
  194. </view>
  195. <view class="order" hidden="{{hiddenOrder}}">
  196. <view wx:if="{{detail.content!=''}}">
  197. <view class="b-f goods-detail-box">
  198. <!-- <view class="goods-cont-li"> -->
  199. <template is="wxParse" data="{{wxParseData:content.nodes}}"></template>
  200. <!-- </view> -->
  201. </view>
  202. </view>
  203. <view wx:else>
  204. <view class="yoshop-notcont">
  205. <text class="iconfont icon-wushuju"></text>
  206. <text class="cont">亲,此处暂无详情数据</text>
  207. </view>
  208. </view>
  209. </view>
  210. </view>
  211. <!-- 底部操作栏 -->
  212. <view class="footer-fixed f-28">
  213. <!-- 返回主页 -->
  214. <form bindsubmit="onNavigationHome" report-submit="true">
  215. <button formType="submit" class="btn-normal">
  216. <view class="goods-fixed-icon dis-flex flex-x-center flex-y-center">
  217. <text class="iconfont icon-zhuye"></text>
  218. </view>
  219. </button>
  220. </form>
  221. <!-- 在线客服 -->
  222. <view class="goods-fixed-icon dis-flex flex-x-center flex-y-center">
  223. <button open-type="contact" sessionFrom="weapp" size="27"
  224. style="opacity: 0;position:absolute;top:0px;left:0px;display:block;width:100%;height:100%;"
  225. type="default-light"></button>
  226. <text class="iconfont icon-kefu"></text>
  227. </view>
  228. <!-- 购买按钮 -->
  229. <view class="fixed-buttons flex-box dis-flex">
  230. <view wx:if="{{ detail.is_alone == 0 }}" class="order-number flex-box dis-flex flex-dir-column flex-x-center">
  231. <form bindsubmit="onTriggerOrder" report-submit="true" data-type="10">
  232. <button formType="submit" class="btn-normal">
  233. <view class="f-26">¥{{ goods_price }}</view>
  234. <view>单独购买</view>
  235. </button>
  236. </form>
  237. </view>
  238. <view class="order-bt flex-box dis-flex flex-dir-column flex-x-center">
  239. <form bindsubmit="onTriggerOrder" report-submit="true" data-type="20">
  240. <button formType="submit" class="btn-normal col-f">
  241. <view class="f-26">¥{{ sharing_price }}</view>
  242. <view>发起拼单</view>
  243. </button>
  244. </form>
  245. </view>
  246. </view>
  247. </view>
  248. </view>
  249. </scroll-view>
  250. <!-- 确认购买弹窗 -->
  251. <zan-popup show="{{ showBottomPopup }}" type="bottom" bindclose="onToggleTrade">
  252. <view class="popup__trade">
  253. <!-- 关闭按钮 -->
  254. <view class="trade-close dis-flex flex-x-center flex-y-center">
  255. <form bindsubmit="onToggleTrade" report-submit="true">
  256. <button formType="submit" class="btn-normal">
  257. <text class="iconfont icon-close f-26"></text>
  258. </button>
  259. </form>
  260. </view>
  261. <!-- 主体信息 -->
  262. <view class="trade-main">
  263. <view class="goods-info dis-flex">
  264. <!-- 图片名称 -->
  265. <view class="goods-image" catchtap="onPreviewSkuImage">
  266. <image src="{{ skuCoverImage }}"></image>
  267. </view>
  268. <view class="right flex-box">
  269. <view class="money-box dis-flex flex-y-end">
  270. <!-- 商品价 -->
  271. <view class="goods-price">
  272. <text class="col-m f-26">¥</text>
  273. <text class="goods-price_num col-m f-40">{{ order_type == 10 ? goods_price : sharing_price }}</text>
  274. </view>
  275. <!-- 划线价 -->
  276. <view class="line-price" wx:if="{{line_price > 0}}">
  277. <text>¥{{ line_price }}</text>
  278. </view>
  279. </view>
  280. <view class="goods-stock dis-flex">
  281. <text class="flex-box f-26 col-7">库存:{{stock_num}}</text>
  282. </view>
  283. </view>
  284. </view>
  285. <!-- 规格列表 -->
  286. <view class="goods-attr">
  287. <!-- 滚动容器 -->
  288. <scroll-view class="goods-attr--scroll" scroll-y="{{ true }}">
  289. <view class="group-item" wx:for="{{ goodsMultiSpec.spec_attr }}" wx:for-item="attr" wx:for-index="attr_idx"
  290. wx:key="this">
  291. <view class="tips-text" data-id="{{ attr.group_id }}">{{ attr.group_name }}</view>
  292. <view class="spec-item {{ item.checked ? 'cur' : '' }}" wx:for="{{ attr.spec_items }}"
  293. wx:for-index="item_idx" wx:key="this" data-attr-idx="{{ attr_idx }}" data-item-idx="{{ item_idx }}"
  294. catchtap="onSwitchSpec">
  295. {{ item.spec_value }}
  296. </view>
  297. </view>
  298. </scroll-view>
  299. </view>
  300. <!-- 购买数量 -->
  301. <view class="buy_number">
  302. <view class="buyNumber f-26">
  303. <text>购买数量</text>
  304. </view>
  305. <view class="select-number">
  306. <form bindsubmit="onDecGoodsNumber" report-submit="true">
  307. <button formType="submit" class="default {{ goods_num > 1 ? '' : 'disabled' }}" type="default">-</button>
  308. </form>
  309. <input bindinput="onInputGoodsNum" type="number" value="{{ goods_num }}"></input>
  310. <form bindsubmit="onIncGoodsNumber" report-submit="true">
  311. <button formType="submit" class="default" type="default">+</button>
  312. </form>
  313. </view>
  314. </view>
  315. </view>
  316. <!-- 底部操作栏 -->
  317. <view class="footer-fixed f-30">
  318. <block wx:if="{{stock_num > 0}}">
  319. <view class="order-bt dis-flex flex-x-center flex-y-center" catchtap="onCheckout">
  320. <text>确定</text>
  321. </view>
  322. </block>
  323. <view class="default-btn" wx:else>暂无现货</view>
  324. </view>
  325. </view>
  326. </zan-popup>
  327. <!-- 返回顶部 -->
  328. <view class="widget-goTop" wx:if="{{floorstatus}}">
  329. <form bindsubmit="onScrollTop" report-submit="true">
  330. <button formType="submit" class="btn-normal">
  331. <text class="iconfont icon-fanhuidingbu"></text>
  332. </button>
  333. </form>
  334. </view>
  335. <!-- 分享按钮 -->
  336. <zan-actionsheet show="{{ share.show }}" actions="{{ share.actions }}" cancel-text="{{ share.cancelText }}"
  337. cancel-with-mask="{{ share.cancelWithMask }}" bind:cancel="onCloseShare" bind:actionclick="onClickShareItem"
  338. mask-class="tiny" />
  339. <!-- 商品海报 弹出层 -->
  340. <zan-popup show="{{ share.showPopup }}" bindclose="onTogglePopup">
  341. <view class="pop-poster pop-example__container">
  342. <!-- 关闭按钮 -->
  343. <view class="pop-close dis-flex flex-x-center flex-y-center" catchtap="onTogglePopup">
  344. <text class="iconfont icon-shanchu f-30 col-9"></text>
  345. </view>
  346. <form bindsubmit="onSavePoster" report-submit="true">
  347. <view class="poster__image">
  348. <image mode="widthFix" src="{{ qrcode }}"></image>
  349. </view>
  350. <view class="poster__tips m-top10 t-c">
  351. </view>
  352. <view class="padding-box m-top10 profile-btn">
  353. <button formType="submit">保存图片</button>
  354. </view>
  355. </form>
  356. </view>
  357. </zan-popup>
  358. <!-- 拼团规则 -->
  359. <zan-dialog id="zan-base-dialog"></zan-dialog>
  360. <!-- 快捷导航 -->
  361. <shortcut id=""></shortcut>