index.wxml 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <!--
  2. - Copyright (C) 2018-2019
  3. - All rights reserved, Designed By www.joolun.com
  4. - 注意:
  5. - 本软件为www.joolun.com开发研制,项目使用请保留此说明
  6. -->
  7. <view class='product-bg bg-white padding-top'>
  8. <swiper class="screen-swiper square-dot screen" indicator-dots="true" circular="true" autoplay="true" interval="5000" duration="500" bindchange="change">
  9. <swiper-item wx:for="{{goodsSpu.picUrls}}" wx:key="index">
  10. <image class="screen-image" src="{{item}}" mode="aspectFill"></image>
  11. </swiper-item>
  12. </swiper>
  13. <view class='page-index cu-tag round'>{{currents}}/{{goodsSpu.picUrls.length || 1}}</view>
  14. </view>
  15. <view class="cu-bar bg-white padding-top-xl">
  16. <view class="text-xxl padding-tb-xs padding-lr-sm">
  17. <text class="text-price text-blue text-bold">{{goodsSpu.salesPrice}}</text>
  18. </view>
  19. <button class="cu-btn icon margin-right" bindtap="shareShow">
  20. <text class="cuIcon-share text-green"></text>
  21. </button>
  22. </view>
  23. <view class="cu-bar bg-white">
  24. <view class="text-lg text-bold padding-lr-sm">
  25. <text class="text-black">{{goodsSpu.name}}</text>
  26. </view>
  27. </view>
  28. <view class="cu-bar bg-white">
  29. <view class="text-sm padding-lr-sm">
  30. <text class="text-gray">{{goodsSpu.sellPoint}}</text>
  31. </view>
  32. </view>
  33. <view class="cu-bar bg-white solid-bottom">
  34. <view class="text-sm padding-lr-sm text-gray">
  35. <text wx:if="{{goodsSpu.marketPrice}}">市场价:</text>
  36. <text class="text-price text-gray">{{goodsSpu.marketPrice}}</text>
  37. </view>
  38. <view class="text-sm margin-right text-gray">
  39. <text>库存:{{goodsSpu.stock}}</text>
  40. </view>
  41. </view>
  42. <view class="cu-bar bg-white solid-bottom">
  43. <view class="flex response">
  44. <view class="flex-sub text-sm">
  45. <view class="text-gray margin-left-sm">深圳发货</view>
  46. </view>
  47. <view class="flex-treble text-sm">
  48. <text class="cuIcon-location text-black" wx:if="{{goodsSpu.deliveryPlace}}">{{goodsSpu.deliveryPlace.place}} | </text>
  49. <text class="text-black" wx:if="{{goodsSpu.freightTemplat}}">运费:全国包邮</text>
  50. </view>
  51. <view class="flex-sub text-sm text-gray text-right margin-right-sm">销量{{goodsSpu.saleNum}}</view>
  52. </view>
  53. </view>
  54. <view class="cu-bar bg-white">
  55. <view class="flex response" bindtap="showModalService">
  56. <view class="flex-sub text-sm">
  57. <view class="text-gray margin-left-sm">服务</view>
  58. </view>
  59. <view class="flex-sub text-sm text-gray text-right margin-right-sm">假一赔十 | 七天无理由退款</view>
  60. </view>
  61. </view>
  62. <ad unit-id="{{config.adBannerID}}" wx:if="{{config.adEnable}}"></ad>
  63. <view class="cu-bar bg-white margin-top-sm">
  64. <view class="content">商品信息</view>
  65. </view>
  66. <view class="bg-white">
  67. <template is="wxParse" data="{{wxParseData:description.nodes}}"/>
  68. </view>
  69. <view class="cu-load bg-gray to-down">已经到底啦...</view>
  70. <view class="cu-bar bg-white tabbar border shop foot">
  71. <button open-type="contact" bindcontact="handleContact" class="action bg-white"
  72. send-message-title="{{goodsSpu.name}}--咨询"
  73. send-message-img="{{goodsSpu.picUrls[0] ? goodsSpu.picUrls[0] : '/public/img/no_pic.png'}}"
  74. show-message-card="true"
  75. send-message-path="/pages/goods/goods-detail/index?id={{goodsSpu.id}}">
  76. <view class="cuIcon-servicefill"></view>
  77. 客服
  78. </button>
  79. <navigator class="action" open-type='switchTab' url='/pages/shopping-cart/index'>
  80. <view class="cuIcon-cart">
  81. <view class="cu-tag badge">{{shoppingCartCount}}</view>
  82. </view>
  83. 购物车
  84. </navigator>
  85. <view class="btn-group">
  86. <button class="cu-btn shadow-blur margin-left-sm shopping-cart" bindtap="toDo" data-type="1"><text class="text-white">加入购物车</text></button>
  87. <button class="cu-btn shadow-blur buy-now" bindtap="toDo" data-type="2"><text class="text-white">立即购买</text></button>
  88. </view>
  89. </view>
  90. <!-- html转wxml -->
  91. <import src="/public/wxParse/wxParse.wxml"/>
  92. <view class="cu-modal {{goodsSpu.shelf=='0'?'show':''}}">
  93. <view class="cu-dialog">
  94. <view class="cu-bar bg-white justify-end">
  95. <view class="content">提示</view>
  96. </view>
  97. <view class="padding-xl">
  98. 抱歉,该商品已下架
  99. </view>
  100. </view>
  101. </view>
  102. <poster id="poster" hide-loading="{{false}}" preload="{{false}}" config="{{posterConfig}}" bind:success="onPosterSuccess" bind:fail="onPosterFail"></poster>
  103. <view class="cu-modal bottom-modal {{shareShow}}">
  104. <view class="cu-dialog">
  105. <view class="cu-bar bg-white">
  106. <view class="action text-green"></view>
  107. <view class="action text-red" bindtap="shareHide">取消</view>
  108. </view>
  109. <view class="padding flex flex-direction">
  110. <button class="cu-btn bg-green lg" open-type='share'>发送给朋友</button>
  111. </view>
  112. </view>
  113. </view>
  114. <view class="cu-modal {{posterShow ? 'show' : ''}}">
  115. <view class="cu-dialog">
  116. <view style="height: calc(100vh - 200rpx)">
  117. <image src="{{posterUrl}}" style="height: 100%;"></image>
  118. </view>
  119. <view class="cu-bar bg-white">
  120. <view class="action margin-0 flex-sub" bindtap="hidePosterShow">取消</view>
  121. <view class="action margin-0 flex-sub solid-left text-red text-bold" bindtap="savePoster">保存到相册</view>
  122. </view>
  123. </view>
  124. </view>