project-detail.wxml 21 KB

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