project-detail.wxml 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357
  1. <import src="../../../utils/wxParse/wxParse.wxml"/>
  2. <view class="app detail-bg">
  3. <view class="sharetips" bindtap="sharetips" wx:if="{{showsharetips}}">
  4. <view class="sharetips-triangle"></view>
  5. <view class="sharetips-txt">请点击右上角选择分享到朋友圈</view>
  6. </view>
  7. <view class="toolBox">
  8. <button open-type="share" class="toolBox-item" wx:if="{{readOnly != 1}}">
  9. <image src="../../../images/footer/wx.png" />
  10. </button>
  11. <button class="toolBox-item" bindtap="toTop" wx:if="{{backTopValue}}"><image src="../../../images/footer/totop.png" /></button>
  12. </view>
  13. <view class="detail-green" wx:if="{{project.is_support_poor === 1}}"></view>
  14. <view class="detail-info">
  15. <swiper indicator-dots="{{indicatorDots}}"
  16. autoplay="{{autoplay}}" bindchange='onSlideChangeEnd' interval="{{interval}}" indicator-dots="{{false}}" duration="{{duration}}" class="detail-swiper">
  17. <block wx:for="{{project.pics}}" wx:key="id">
  18. <swiper-item>
  19. <image src="{{item.img}}" class="detail-img" />
  20. </swiper-item>
  21. </block>
  22. </swiper>
  23. <view class="mokuai" wx:if="{{project.pics.length > 1}}">{{imgindex}}/{{project.pics.length}}</view>
  24. <view class="seckill-top" wx:if="{{project.is_under_seckill}}">
  25. <view class="seckill-title">
  26. <view class="seckill-time">
  27. <view class="time-click">
  28. <!--<view class="time-item time-kuang1">{{msecond}}</view>-->
  29. <view class="time-item time-kuang">{{second}}</view>
  30. <view class="time-item time-color"> : </view>
  31. <view class="time-item time-kuang">{{min}}</view>
  32. <view class="time-item time-color"> : </view>
  33. <view class="time-item time-kuang">{{hour}}</view>
  34. </view>
  35. <view class="time-text">本期剩余时间</view>
  36. </view>
  37. </view>
  38. <view><image src="http://fohow.oss-cn-shenzhen.aliyuncs.com/neverse/otherskill.png" class="seckill-img" /></view>
  39. </view>
  40. <h3 class="detail-width detail-title"><i wx:if="{{project.pv < project.price}}" style="display: inline-block;background: #F44336;color: #fff;padding: 0px 5px;font-size: 11px;line-height: 35rpx;margin-right: 10rpx;vertical-align: middle;">特惠</i>{{project.name}}</h3>
  41. <button bindtap="sharetips" class="sharebtn" wx:if="{{readOnly != 1}}"><image src="../../../images/footer/pyq.png" /><text>分享到朋友圈</text></button>
  42. <!--<view class="detail-width">
  43. <text class="detail-normal detail-mr">价格</text>
  44. <currency symbol="¥" value="{{project.price}}" class="detail-price"></currency>
  45. </view>-->
  46. <view class="project-pack-list" wx:if="{{project.package}}">
  47. <view wx:for="{{project.package_list}}" wx:for-item="pack" wx:for-index="ind">
  48. <p>{{pack.item_title}} x{{pack.nums}}</p>
  49. </view>
  50. </view>
  51. <view class="detail-width">
  52. <view style="color: #999;text-decoration: line-through;font-size: 23rpx;">
  53. <text class="detail-normal detail-mr" style="color: #999;text-decoration: line-through;font-size: 23rpx;margin-right:0">零售价:</text>
  54. <currency symbol="¥" value="{{project.user_sale_price}}"></currency>
  55. </view>
  56. <view class="detail-fl">
  57. <text class="detail-normal detail-mr">价格</text>
  58. <currency symbol="¥" value="{{project.price}}" class="detail-price"></currency>
  59. <text class="detail-pass" wx:if="{{project.is_under_seckill}}">({{project.seckill_show_price / 100}}元)</text>
  60. </view>
  61. <!-- <view class="detail-fl" wx:if="{{balance === 0 || balance < project.price}}">
  62. <text class="detail-normal detail-mr">价格</text>
  63. <currency symbol="¥" value="{{project.price}}" class="detail-price"></currency>
  64. </view>
  65. <view class="detail-fl" wx:if="{{balance !== 0 && balance >= project.price}}">
  66. <text class="detail-normal detail-mr">兑换</text>
  67. <text class="detail-normal" style="font-size:30rpx;color:#eab86a;">{{project.price}}提货券</text>
  68. </view> -->
  69. <view class="detail-fr">
  70. <text class="detail-normal">已售出{{project.sold_count}}件</text>
  71. </view>
  72. <view class="clean"></view>
  73. <view class="detail-stop" wx:if="{{todaysend < project.deliver_start_time && todaysend > project.deliver_stop_time}}">因物流停运 , <format-time type="formatmonth2" value="{{project.deliver_stop_time}}"></format-time>下单的 , 将于<format-time type="formatmonth2" value="{{project.deliver_start_time}}"></format-time>发货</view>
  74. <!--<view style="float:left">
  75. <view class="detail-normal detail-mr">支持</view>
  76. <image class="detail-icon" wx:if="{{project.robo_balance_price}}" src="http://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/image/icon/rabbitpay_icon.png" />
  77. <image class="detail-icon" wx:if="{{project.mall_balance_price}}" src="http://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/image/icon/integralpay_icon.png" />
  78. <image class="detail-icon" wx:if="{{project.price}}" src="http://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/image/icon/weixinpay.png" />
  79. </view>-->
  80. <!-- <view class="detail-fr">
  81. <text class="detail-normal">已售出{{project.sold_count}}件</text>
  82. </view>-->
  83. <!--<view class="clean"></view>-->
  84. </view>
  85. </view>
  86. <view class="detail-no" wx:if="{{project.specification || project.no_delivery_area}}">
  87. <view class="detail-no-first" wx:if="{{project.specification}}">
  88. <image src="http://fohow.oss-cn-shenzhen.aliyuncs.com/product/product-icon/maindetail.png" class="detail-no-img"/>
  89. <view class="detail-no-text">规格 : {{project.specification}}</view>
  90. </view>
  91. <view wx:if="{{project.no_delivery_area}}">
  92. <image src="http://fohow.oss-cn-shenzhen.aliyuncs.com/product/product-icon/noaddress.png" class="detail-no-img1"/>
  93. <view class="detail-no-text">不发货地区 : {{project.no_delivery_area}}</view>
  94. </view>
  95. </view>
  96. <view class="comment_head">
  97. <h4>
  98. 商品评价
  99. <navigator url="../project-comment/project-comment?id={{project.id}}" open-type="navigate" class="showmore">查看更多 > </navigator>
  100. </h4>
  101. </view>
  102. <view class="comment_box">
  103. <view class="comment_box_list">
  104. <view class="comment_list" wx:for="{{projectComment}}">
  105. <image src="{{item.head}}"></image>
  106. <view class="comment_user">
  107. {{item.nick_name}}
  108. <view class="comment_star">
  109. <view class="evaluateLv"><view class="list-item" wx:for="{{item.star}}" wx:for-item="item2"><image class="block" src="{{item2}}"></image></view></view>
  110. </view>
  111. </view>
  112. <p class="comment_txt">{{item.detail}}</p>
  113. <span class="comment_time"><format-time type="formatTime" value="{{item.create_time}}" ></format-time></span>
  114. </view>
  115. <!-- <view class="comment_list">
  116. <image src="http://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/image/icon/parner.png"></image>
  117. <view class="comment_user">
  118. name
  119. <view class="comment_star">
  120. <view class="evaluateLv"><view class="list-item" wx:for="{{lvList}}" wx:key="item"><image class="block" src="{{item}}" data-index="{{index}}"></image></view></view>
  121. </view>
  122. </view>
  123. <p class="comment_txt">asdfasdfasdffffffffffffffffffffffffffffffffffffffffffffffffffffffffff</p>
  124. <span class="comment_time">2021-2-2 11:11:11</span>
  125. </view> -->
  126. </view>
  127. </view>
  128. <view class="detail-content">
  129. <text class="detail-content-title">———— 商品详情 ————</text>
  130. <!-- <view class="detail-content-desc">
  131. {{project.detail}}
  132. </view> -->
  133. <view class="detail-parse">
  134. <template is="wxParse" data="{{wxParseData:parse.nodes}}"/>
  135. <!-- <image wx:for="{{project.detail_pics}}" src="{{item.img}}" class="detail-project-img" bindload="imageLoad" data-list="{{project.detail_pics}}" data-src="{{item.img}}" data-index="{{index}}" bindtap="detailImg" wx:key="id" style="width:{{images[index].width}}rpx; height:{{images[index].height}}rpx;"></image> -->
  136. </view>
  137. </view>
  138. <view class="detail-footer" wx:if="{{readOnly == 0}}">
  139. <view class="detail-footer-bar" style="padding-bottom: {{value}}rpx;">
  140. <view class="detail-footer-item" style="flex: 0.18;">
  141. <navigator url="../../home/home" open-type="switchTab">
  142. <image src="../../../images/footer/home.png" class="detail-footer-icon"></image>
  143. <text class="detail-footer-text">首页</text>
  144. </navigator>
  145. </view>
  146. <view class="detail-footer-item" style="flex: 0.18;">
  147. <navigator url="../../cart/cart" open-type="switchTab">
  148. <image src="../../../images/footer/shoppingcart.png" class="p-footer-icon"></image>
  149. <text class="p-footer-text">购物车</text>
  150. </navigator>
  151. </view>
  152. <!--
  153. <view class="detail-footer-item" style="flex: 0.18;">
  154. <navigator url="../../helpfarm/othercustom/othercustom" open-type="navigate">
  155. <image src="../../../images/footer/weixin.png" class="p-footer-icon"></image>
  156. <text class="p-footer-text">客服</text>
  157. </navigator>
  158. </view>
  159. -->
  160. <view class="detail-footer-item" style="flex: 0.18;" bindtap="createPoster">
  161. <image src="../../../images/footer/poster.png" class="p-footer-icon"></image>
  162. <text class="p-footer-text">分享</text>
  163. </view>
  164. <!-- <view class="detail-footer-item" style="flex: 0.5;">
  165. <image src="../../../images/footer/shoppingcart.png" class="detail-footer-icon"></image>
  166. <text class="detail-footer-text">购物车</text>
  167. </view> -->
  168. <!-- 判断isdeliver-->
  169. <button class="detail-footer-item detail-yellow" bindtap="toCart" wx:if="{{project.is_deliver && project.left_count > 0 && project.deliver_state == 2}}">
  170. <text>加入购物车</text>
  171. </button>
  172. <form bindsubmit="toPay" report-submit="{{true}}" wx:if="{{project.is_deliver &&project.left_count > 0 && project.deliver_state == 2}}" class="detail-footer-item">
  173. <button class=" detail-red" formType="submit">
  174. 立即购买
  175. </button>
  176. </form>
  177. <form wx:if="{{project.is_deliver &&project.deliver_state ==1}}" class="detail-footer-item" style=" flex: 1;">
  178. <button class="detail-red" disabled="disabled" style="background: #ccc !important;color: #FFF !important;font-size: 24rpx;">
  179. <format-time type="formatTime" value="{{project.deliver_start_time}}" ></format-time>开售,敬请期待!
  180. </button>
  181. </form>
  182. <view class="detail-footer-item detail-black" wx:if="{{project.is_deliver &&project.left_count <= 0 || project.deliver_state == 3}}">
  183. <text>已售罄</text>
  184. </view>
  185. <!-- 正常流程-->
  186. <!-- <button class="detail-footer-item detail-yellow" bindtap="toCart" wx:if="{{!project.is_deliver && project.seckill_show_price <= 0 && project.left_count > 0}}">
  187. <text>加入购物车</text>
  188. </button> -->
  189. <button class="detail-footer-item detail-yellow" bindtap="toCart" wx:if="{{!project.is_deliver &&project.left_count > 0 && project.seckill_state !='end'}}">
  190. <text>加入购物车</text>
  191. </button>
  192. <form bindsubmit="toPay" report-submit="{{true}}" wx:if="{{!project.is_deliver &&project.left_count > 0 && (project.seckill_state !='end' && project.seckill_state !='preparing')}}" class="detail-footer-item">
  193. <button class=" detail-red" formType="submit">
  194. 立即购买
  195. </button>
  196. </form>
  197. <form wx:if="{{!project.is_deliver &&project.left_count > 0 && project.seckill_state =='preparing'}}" class="detail-footer-item">
  198. <button class="detail-red" disabled="disabled" style="background: #ccc !important;color: #FFF !important;">
  199. 秒杀尚未开始
  200. </button>
  201. </form>
  202. <form wx:if="{{!project.is_deliver &&project.left_count > 0 && project.seckill_state =='end'}}" class="detail-footer-item">
  203. <button class="detail-red" disabled="disabled" style="background: #ccc !important;color: #FFF !important;">
  204. 秒杀已结束
  205. </button>
  206. </form>
  207. <view class="detail-footer-item detail-black" wx:if="{{!project.is_deliver &&project.left_count <= 0}}">
  208. <text>已售罄</text>
  209. </view>
  210. </view>
  211. </view>
  212. <view class="detail-footer" wx:if="{{readOnly == 1}}">
  213. <button bindtap="back" style="background: #fff;color: #eab86a;"> 返回</button>
  214. </view>
  215. </view>
  216. <view wx:if="{{showDialog}}">
  217. <view class="dialog-panel" animation="{{animationData}}" style="padding-bottom: {{value}}rpx;">
  218. <view class="dialog-project">
  219. <image class="dialog-cancel" src="http://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/image/cancel.png" bindtap="toPay"></image>
  220. <view class="dialog-content">
  221. <image class="dialog-img" src="{{project.pics[0].img}}"></image>
  222. <view class="dialog-info" style="margin-top: 20rpx;">
  223. <h6 style="font-size: 35rpx;font-weight: bold;color: #666;"><i wx:if="{{project.pv < project.price}}" style="display: inline-block;background: #F44336;color: #fff;padding: 0px 5px;font-size: 11px;line-height: 35rpx;margin-right: 10rpx;vertical-align: middle;">特惠</i>{{project.name}}</h6>
  224. <view class="dialog-word dialog-black" style="margin-top: 15rpx;color: #999;">库存{{project.left_count}}件 <text wx:if="{{project.have_size && (sname || cname)}}">(已选:{{cname}} {{sname}})</text></view>
  225. <view class="dialog-word dialog-red" style="font-size: 35rpx;margin-top: 25rpx;">
  226. <!-- {{project.price}}提货券 -->
  227. <currency symbol="¥" value="{{project.price}}"></currency>
  228. </view>
  229. <!-- <view class="dialog-word dialog-gray">或{{project.price}}提货券</view> -->
  230. </view>
  231. <view class="clean"></view>
  232. </view>
  233. <view class="select-count">
  234. <view class="select-word">数量</view>
  235. <view class="select-input">
  236. <button bindtap="mius">-</button>
  237. <input type="number" value="{{count}}" bindinput="changeCount" />
  238. <button bindtap="add">+</button>
  239. </view>
  240. <view class="clean"></view>
  241. </view>
  242. <view wx:if="{{project.have_size}}" class="select-count">
  243. <view wx:for="{{productSize}}" wx:for-item="i" wx:key="{{index}}">
  244. <view wx:if="{{index != 'product'}}">
  245. <h5 class="sizeTitle">{{i.name}}</h5>
  246. <view wx:for="{{i.attr_values}}" wx:for-index="index2" wx:for-item="j" class="checkList">
  247. <span bindtap="checkSize" data-type='{{index}}' data-tname="{{j.name}}" data-list="{{index2}}" data-id="{{j.id}}" class="{{j.is_select?'active':''}}">
  248. {{j.name}}
  249. </span>
  250. </view>
  251. </view>
  252. </view>
  253. </view>
  254. <form bindsubmit="pay" report-submit="{{true}}" >
  255. <button class="dialog-btn" formType="submit" wx:if="{{showpay}}" disabled="{{canpay?'':'true'}}"><text wx:if="{{!noproduct}}">立即购买</text><text wx:if="{{noproduct}}">暂无库存</text></button>
  256. </form>
  257. <button class="dialog-btn" open-type="share" wx:if="{{!showpay}}"><text wx:if="{{!noproduct}}">立即购买</text><text wx:if="{{noproduct}}">暂无库存</text></button>
  258. </view>
  259. </view>
  260. <view class="detail-dialog" bindtap="toPay"></view>
  261. </view>
  262. <view wx:if="{{showCartDialog}}">
  263. <view class="dialog-panel" animation="{{animationData}}" style="padding-bottom: {{value}}rpx;">
  264. <view class="dialog-project">
  265. <image class="dialog-cancel" src="http://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/image/cancel.png" bindtap="toCart"></image>
  266. <view class="dialog-content">
  267. <image class="dialog-img" src="{{project.pics[0].img}}"></image>
  268. <view class="dialog-info" style="margin-top: 20rpx;">
  269. <h6 style="font-size: 35rpx;font-weight: bold;color: #666;"><i wx:if="{{project.pv < project.price}}" style="display: inline-block;background: #F44336;color: #fff;padding: 0px 5px;font-size: 11px;line-height: 35rpx;margin-right: 10rpx;vertical-align: middle;">特惠</i>{{project.name}}</h6>
  270. <view class="dialog-word dialog-black" style="margin-top: 15rpx;color: #999;">库存{{project.left_count}}件 <text wx:if="{{project.have_size && (sname || cname)}}">(已选:{{cname}} {{sname}})</text></view>
  271. <view class="dialog-word dialog-red" style="font-size: 35rpx;margin-top: 25rpx;">
  272. <!-- {{project.price}}提货券 -->
  273. <currency symbol="¥" value="{{project.price}}"></currency>
  274. </view>
  275. <!-- <view class="dialog-word dialog-gray">或{{project.price}}提货券</view> -->
  276. </view>
  277. <view class="clean"></view>
  278. </view>
  279. <view class="select-count">
  280. <view class="select-word">数量</view>
  281. <view class="select-input">
  282. <button bindtap="mius">-</button>
  283. <input type="number" value="{{count}}" bindinput="changeCount" />
  284. <button bindtap="add">+</button>
  285. </view>
  286. <view class="clean"></view>
  287. </view>
  288. <view wx:if="{{project.have_size}}" class="select-count">
  289. <view wx:for="{{productSize}}" wx:for-item="i" wx:key="{{index}}">
  290. <view wx:if="{{index != 'product'}}">
  291. <h5 class="sizeTitle">{{i.name}}</h5>
  292. <view wx:for="{{i.attr_values}}" wx:for-index="index2" wx:for-item="j" class="checkList">
  293. <span bindtap="checkSize" data-type='{{index}}' data-tname="{{j.name}}" data-list="{{index2}}" data-id="{{j.id}}" class="{{j.is_select?'active':''}}">
  294. {{j.name}}
  295. </span>
  296. </view>
  297. </view>
  298. </view>
  299. </view>
  300. <button class="detail-yellow" bindtap="addCart" style="width:100%" disabled="{{!canpay?'true':''}}"><text wx:if="{{!noproduct}}">加入购物车</text><text wx:if="{{noproduct}}">暂无库存</text></button>
  301. </view>
  302. </view>
  303. <view class="detail-dialog" bindtap="toCart"></view>
  304. </view>
  305. <view class="poster" wx:if="{{posterPopup}}" catchtouchmove="stopPageScroll">
  306. <view class="poster-main">
  307. <view style="height: 60rpx;"></view>
  308. <view class="poster-close" bindtap="posterClose"></view>
  309. <image class="poster-img" src="{{posterImage}}"></image>
  310. <view class="poster-text">保存图片,叫伙伴们来围观吧</view>
  311. <view class="poster-btn" bindtap="saveImage">
  312. <view class="poster-icon"></view>
  313. <view class="poster-save" >保存</view>
  314. <view class="clear"></view>
  315. </view>
  316. </view>
  317. </view>
  318. <view class="canvas-position">
  319. <canvas class="canvas" style="width: 750px; height: 1334px" canvas-id="myCanvas" ></canvas>
  320. </view>
  321. <view class="popup-bg" wx:if="{{popup}}">
  322. <view class="popup" >
  323. <view class="popup-title">提示</view>
  324. <view class="popup-logobg">
  325. <view class="popup-image" ></view>
  326. </view>
  327. <text class="popup-hint">凤凰菁选商城申请同意相册保存\n以确保正常使用保存相册功能</text>
  328. <button class="popup-bottom" open-type="openSetting" bindopensetting="setting">确认</button>
  329. </view>
  330. </view>