project-detail.wxml 20 KB

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