buyMoonCake.wxml 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393
  1. <!--buy.wxml 购买商品 - 详情页-->
  2. <import src="../../wxParse/wxParse.wxml"/>
  3. <scroll-view class="container {{cont_hidden}}" style="{{state}}" scroll-y="true">
  4. <!-- banner -->
  5. <view class="goods_img">
  6. <swiper class="banner_swiper" indicator-dots="true" circular="true" duration="1000" style="height: 750rpx;">
  7. <block wx:for="{{banner}}" wx:key="{{index}}">
  8. <swiper-item class="banner">
  9. <image wx:if="{{urlHttp}}" bindtap="previewImg" src="{{urlHttp}}images/{{item}}" data-src="{{urlHttp}}images/{{item}}" mode="widthFix"></image>
  10. </swiper-item>
  11. </block>
  12. </swiper>
  13. </view>
  14. <!-- 商品详情 -->
  15. <view class="goods_infor_wrap">
  16. <view class='goods_title_wrap'>
  17. <view class="goods_title">{{title}}</view>
  18. <view class='goods_title_intro'>{{intro}}</view>
  19. <block wx:if="{{user_id == 'oovpNwvQGE0uUqpsQrbiVigaEFM0'}}">
  20. <button class='collect_wrap share_wrap' plain="true" open-type="share">
  21. <image src="/images/bug_share_icon.png" class='collect_icon'></image>
  22. <view class='collect_cont'>分享</view>
  23. </button>
  24. <view class='collect_wrap' bindtap='collect' data-state="{{collectState}}">
  25. <image src="{{collectState ? '/images/zan_gray_pre.png' : '/images/zan_gray_n.png'}}" class='collect_icon'></image>
  26. <view class='collect_cont'>{{collectState ? '已收藏' : ' 收藏'}}</view>
  27. </view>
  28. </block>
  29. <block wx:elif="{{user_id == 'oovpNwo_ocpujBYeYATSXkDUfJnU'}}">
  30. <button class='collect_wrap share_wrap' plain="true" open-type="share">
  31. <image src="/images/bug_share_icon.png" class='collect_icon'></image>
  32. <view class='collect_cont'>分享</view>
  33. </button>
  34. <view class='collect_wrap' bindtap='collect' data-state="{{collectState}}">
  35. <image src="{{collectState ? '/images/zan_gray_pre.png' : '/images/zan_gray_n.png'}}" class='collect_icon'></image>
  36. <view class='collect_cont'>{{collectState ? '已收藏' : ' 收藏'}}</view>
  37. </view>
  38. </block>
  39. <block wx:else>
  40. <view class='collect_wrap share_wrap' bindtap='collect' data-state="{{collectState}}">
  41. <image src="{{collectState ? '/images/zan_gray_pre.png' : '/images/zan_gray_n.png'}}" class='collect_icon'></image>
  42. <view class='collect_cont'>{{collectState ? '已收藏' : ' 收藏'}}</view>
  43. </view>
  44. </block>
  45. </view>
  46. <view class="goods_infor clearfix">
  47. <view class="goods_price">
  48. <!-- newPrice -->
  49. <text class="new_price">¥{{newPrice}}</text>
  50. <text class="old_price" decode="true" >&nbsp;¥{{oldPrice}}&nbsp;&nbsp;</text>
  51. </view>
  52. <view class="goods_limit clearfix">
  53. <view class='goods_limit_each'>
  54. <text class='goods_limit_each_tit'>起订</text>
  55. <text class="min_number">起订量{{num}}件</text>
  56. </view>
  57. <view class='goods_limit_each'>
  58. <text class='goods_limit_each_tit'>定制</text>
  59. <text class="min_number">定制周期{{cycle}}天</text>
  60. </view>
  61. </view>
  62. </view>
  63. </view>
  64. <!-- 选择商品&定制详情 -->
  65. <view class='choose_goods_wrap clearfix' bindtap='showGoodsInfor'>
  66. <image src='/images/buy_choose_icon.png' class="choose_goods_icon"></image>
  67. <text class='choose_goods_title' wx:if="{{chooseResult == 0}}">选择商品&定制详情</text>
  68. <text class='choose_goods_title' wx:else>已选择 {{rule1}} {{rule2}} {{rule3}} {{rule4}} {{rule5}} {{selectBox}} {{selectDingZhi}}</text>
  69. <image class='brand_jiantou' src='/images/black_more_2.png'></image>
  70. </view>
  71. <!-- 服务 -->
  72. <view class='choose_goods_wrap clearfix' bindtap='showServiceInfor'>
  73. <image src='/images/buy_service_icon.png' class="choose_goods_icon"></image>
  74. <text class='choose_service_title'>服务</text>
  75. <view class='choose_service_infor '>
  76. <block wx:for="{{goodsService}}" wx:key="index" wx:index-for="i">
  77. <block wx:if="{{iconNum != 0}}">
  78. <view class='choose_service_each '>
  79. <image class="service_cont_icon" wx:if="{{item.acceptance_logo}}" src="{{item.acceptance_logo}}"></image>
  80. <text class='service_cont_title choose_service_tit'>{{item.acceptance_name}}</text>
  81. </view>
  82. </block>
  83. <!-- <image src='/images/buy_service_each_icon.png' class="service_cont_icon"></image>
  84. <text class='service_cont_title choose_service_tit'>{{item.acceptance_name}}</text> -->
  85. </block>
  86. </view>
  87. <image class='brand_jiantou' src='/images/black_more_2.png'></image>
  88. </view>
  89. <!-- 品牌信息 -->
  90. <!-- <navigator wx:if="{{brandname}}" url="/pages/brandInfor/brandInfor?title={{brandname}}&intro={{brandtitle}}&src={{brandBanner}}&id={{brandid}}" class="brand_infor_wrap">
  91. <image src="{{brandlogo}}" class="brand_mark"></image>
  92. <view class="brand_name">{{brandname}}</view>
  93. <image src="/images/black_more_2.png" class="brand_jiantou"></image>
  94. </navigator> -->
  95. <!-- 具体信息 -->
  96. <view class='only_staff_infor'>此商品为大良造员工专享,非员工购买无效</view>
  97. <view class="goods_content">
  98. <template is="wxParse" data="{{wxParseData:article1.nodes}}" class="article_cont_cont"/>
  99. </view>
  100. <view style='height:98rpx;'></view>
  101. </scroll-view>
  102. <!-- 底部购买栏 -->
  103. <view class="footer">
  104. <view class="footer_left">
  105. <navigator class="footer_left_each">
  106. <contact-button class="button-image" type="default-light" size="27" class="kefu_icon"/>
  107. <image src="/images/goods_footer_kefu.png"></image>
  108. <view>客服</view>
  109. </navigator>
  110. <view bindtap='linkCart' class="footer_left_each footer_left_cart">
  111. <image src="/images/goods_footer_cart.png"></image>
  112. <view>购物车</view>
  113. <view wx:if="{{cartNum != 0}}" class="cart_num">
  114. <image src='/images/buy_cart_num.png' class="cart_num_icon"></image>
  115. <view class='cart_num_num'>{{cartNum}}</view>
  116. </view>
  117. </view>
  118. </view>
  119. <block wx:if="{{soldOutShow}}">
  120. <!-- 下架 -->
  121. <view class='footer_add footer_btn_gray'>商品已经下架啦~</view>
  122. </block>
  123. <block wx:elif="{{sumTotal <= 0}}">
  124. <view class='footer_add footer_btn_gray'>商品已售罄~</view>
  125. </block>
  126. <block wx:else>
  127. <view class='footer_buy' bindtap="buyCart"> 立 即 购 买 </view>
  128. </block>
  129. </view>
  130. <!-- 服务 - 弹窗 -->
  131. <view class="rule_made_wrap_wrap" animation="{{animationDataSer}}">
  132. <view class="rule_made_wrap">
  133. <view class="made_bg" bindtap='closeService'></view>
  134. <view class="rule_made rule_made_ser">
  135. <view class="picker_top picker_top_ser">
  136. <icon type="cancel" bindtap="closeService" size="21" color="#b5b6b6" class="picker_cancel"/>
  137. <view class="picker_top_cont">
  138. <view class='service_title_wrap'>
  139. <view class="service_title_line"></view>
  140. <view class="service_title_cont">服务保证</view>
  141. </view>
  142. </view>
  143. </view>
  144. <view class="picker_body picker_body_ser">
  145. <view class="picker_body_cont">
  146. <view class='service_cont_wrap'>
  147. <!-- 服务保证 -->
  148. <block wx:for="{{goodsService}}" wx:key="index" wx:for-index="i">
  149. <view class='service_each'>
  150. <view class='service_each_title clearfix'>
  151. <image wx:if="{{item.acceptance_logo}}" src="{{item.acceptance_logo}}" class="service_cont_icon"></image>
  152. <text class='service_cont_title'>{{item.acceptance_name}}</text>
  153. </view>
  154. <view class='service_each_cont'>{{item.acceptance_des}}</view>
  155. </view>
  156. </block>
  157. <!-- 服务保证结束 -->
  158. </view>
  159. </view>
  160. <view class="picker_btn" bindtap="closeService" animation="{{animationData}}">确 定</view>
  161. </view>
  162. </view>
  163. </view>
  164. </view>
  165. <!-- 立即购买 - 弹出选择规格详情列表 -->
  166. <view class="windBg {{isShow ? '' : 'hidden'}}" animation="{{windBgShow}}"></view>
  167. <view class="rule_made_wrap_wrap" animation="{{animationDataBuy}}">
  168. <view class="rule_made_wrap">
  169. <view class="made_bg" bindtap='closeBuy'></view>
  170. <image wx:if="{{bannerSml}}" src="{{bannerSml}}" class="picker_goods_img"></image>
  171. <view class="rule_made">
  172. <view class="picker_top">
  173. <view class="picker_top_cont">
  174. <view class="picker_goods_infor">
  175. <view class="picker_price">
  176. <text class="price_title">¥ </text>
  177. <text class="new_price"> {{newPrice}}</text>
  178. </view>
  179. <view class="picker_rule">选择了
  180. <text>{{rule1}} {{rule2}} {{rule3}} {{rule4}} {{rule5}} {{selectBox}} {{selectDingZhi}}</text>
  181. </view>
  182. <view class="picker_price">
  183. <view class='kucun'>库存:{{showNum}}件</view>
  184. </view>
  185. </view>
  186. <icon type="cancel" bindtap="closeBuy" size="21" color="#b5b6b6" class="picker_cancel"/>
  187. </view>
  188. </view>
  189. <view class="picker_body">
  190. <view class="picker_body_cont">
  191. <!-- 规格1 -->
  192. <view wx:if="{{style1 > 0 }}" class="goods_kind_wrap margintop">
  193. <view class="goods_service" >
  194. <view class="service_title">{{style1_name}}</view>
  195. <block wx:for="{{Style1}}" wx:key="index" wx:for-index="i" >
  196. <view class="each_color {{item.clickTrue ? '' : 'clickNo'}}" bindtap="{{item.clickTrue ? 'ruleSelect' : ''}}" data-id="{{i}}" data-sheetid="{{item.datasheet_id}}" data-rule="1" data-sta="0">
  197. <block wx:if="{{style1 > 0}}">
  198. <image wx:if="{{item.datasheet_logo}}" src="{{item.datasheet_logo}}" class="color_icon"></image>
  199. <view class="color_name">{{item.datasheet_name}}</view>
  200. <view class="style_mode {{ruleClick1 == i ? 'active_style' : ''}}"></view>
  201. </block>
  202. <block wx:else>
  203. <view class="color_name {{ruleClick1 == i ? 'active_style' : ''}}">{{item.datasheet_name}}</view>
  204. </block>
  205. </view>
  206. </block>
  207. </view>
  208. </view>
  209. <!-- 规格2 -->
  210. <view wx:if="{{style2 > 0 }}" class="goods_kind_wrap margintop">
  211. <view class="goods_service" >
  212. <view class="service_title">{{style2_name}}</view>
  213. <view wx:for="{{Style2}}" wx:key="index" wx:for-index="i" data-id="{{i}}" class="each_color {{item.clickTrue ? '' : 'clickNo'}}" data-rule="2" bindtap="{{item.clickTrue ? 'ruleSelect' : ''}}" data-sheetid="{{item.datasheet_id}}">
  214. <block wx:if="{{style2 > 0}}">
  215. <image wx:if="{{item.datasheet_logo}}" src="{{item.datasheet_logo}}" class="color_icon"></image>
  216. <view class="color_name">{{item.datasheet_name}}</view>
  217. <view class="style_mode {{ruleClick2 == i ? 'active_style' : ''}}"></view>
  218. </block>
  219. <block wx:else>
  220. <view class="color_name {{ruleClick2 == i ? 'active_style' : ''}}">{{item.datasheet_name}}</view>
  221. </block>
  222. </view>
  223. </view>
  224. </view>
  225. <!-- 规格3 -->
  226. <view wx:if="{{style3 > 0 }}" class="goods_kind_wrap margintop">
  227. <view class="goods_service" >
  228. <view class="service_title">{{style3_name}}</view>
  229. <view wx:for="{{Style3}}" wx:key="index" wx:for-index="i" data-id="{{i}}" class="each_color {{item.clickTrue ? '' : 'clickNo'}}" data-rule="3" bindtap="{{item.clickTrue ? 'ruleSelect' : ''}}" data-sheetid="{{item.datasheet_id}}">
  230. <block wx:if="{{style3 > 0}}">
  231. <image wx:if="{{item.datasheet_logo}}" src="{{item.datasheet_logo}}" class="color_icon"></image>
  232. <view class="color_name">{{item.datasheet_name}}</view>
  233. <view class="style_mode {{ruleClick3 == i ? 'active_style' : ''}}"></view>
  234. </block>
  235. <block wx:else>
  236. <view class="color_name {{ruleClick3 == i ? 'active_style' : ''}}">{{item.datasheet_name}}</view>
  237. </block>
  238. </view>
  239. </view>
  240. </view>
  241. <!-- 规格4 -->
  242. <view wx:if="{{style4 > 0 }}" class="goods_kind_wrap margintop">
  243. <view class="goods_service" >
  244. <view class="service_title">{{style4_name}}</view>
  245. <view wx:for="{{Style4}}" wx:key="index" wx:for-index="i" data-id="{{i}}" class="each_color {{item.clickTrue ? '' : 'clickNo'}}" data-rule="4" bindtap="{{item.clickTrue ? 'ruleSelect' : ''}}" data-sheetid="{{item.datasheet_id}}">
  246. <block wx:if="{{style4 > 0}}">
  247. <image wx:if="{{item.datasheet_logo}}" src="{{item.datasheet_logo}}" class="color_icon"></image>
  248. <view class="color_name">{{item.datasheet_name}}</view>
  249. <view class="style_mode {{ruleClick4 == i ? 'active_style' : ''}}"></view>
  250. </block>
  251. <block wx:else>
  252. <view class="color_name {{ruleClick4 == i ? 'active_style' : ''}}">{{item.datasheet_name}}</view>
  253. </block>
  254. </view>
  255. </view>
  256. </view>
  257. <!-- 规格5 -->
  258. <view wx:if="{{style5 > 0 }}" class="goods_kind_wrap margintop">
  259. <view class="goods_service" >
  260. <view class="service_title">{{style5_name}}</view>
  261. <view wx:for="{{Style5}}" wx:key="index" wx:for-index="i" data-id="{{i}}" class="each_color {{item.clickTrue ? '' : 'clickNo'}}" data-rule="5" bindtap="{{item.clickTrue ? 'ruleSelect' : ''}}" data-sheetid="{{item.datasheet_id}}">
  262. <block wx:if="{{style5 > 0}}">
  263. <image wx:if="{{item.datasheet_logo}}" src="{{item.datasheet_logo}}" class="color_icon"></image>
  264. <view class="color_name">{{item.datasheet_name}}</view>
  265. <view class="style_mode {{ruleClick5 == i ? 'active_style' : ''}}"></view>
  266. </block>
  267. <block wx:else>
  268. <view class="color_name {{ruleClick5 == i ? 'active_style' : ''}}">{{item.datasheet_name}}</view>
  269. </block>
  270. </view>
  271. </view>
  272. </view>
  273. <!-- 礼盒 -->
  274. <view wx:if="{{giftboxsize != '' }}" class="goods_kind_wrap margintop">
  275. <view class="goods_service" >
  276. <view class="service_title">礼盒</view>
  277. <view wx:for="{{gixboxService}}" wx:key="index" wx:for-index="i" data-id="{{i}}" class="each_color" bindtap="boxSelect">
  278. <block wx:if="{{iconNum != 0}}">
  279. <image class="color_icon {{boxClick == i ? 'active_style' : ''}}" wx:if="{{item.giftbox_logo}}" src="{{item.giftbox_logo}}"></image>
  280. <view class="color_name">{{item.giftbox_name}}</view>
  281. <view class="style_mode {{boxClick == i ? 'active_style' : ''}}"></view>
  282. </block>
  283. <block wx:else>
  284. <view class="color_name {{boxClick == i ? 'active_style' : ''}}">{{item.giftbox_name}}</view>
  285. </block>
  286. <view class="clearfix"></view>
  287. </view>
  288. <view class="clearfix"></view>
  289. </view>
  290. </view>
  291. <!-- 定制 -->
  292. <view wx:if="{{dingzhiService != ''}}" class="goods_kind_wrap margintop">
  293. <view class="goods_service" >
  294. <view class="service_title">定制工艺</view>
  295. <view wx:for="{{dingzhiService}}" wx:key="index" wx:for-index="i" data-id="{{i}}" class="each_color each_dz_service" bindtap="dingZhiSelect">
  296. <block wx:if="{{iconNum != 0}}">
  297. <image class="color_icon {{dingZhiClick == i ? 'active_style' : ''}}" wx:if="{{item.process_logo}}" src="{{item.process_logo}}"></image>
  298. <view class="color_name">{{item.process_name}}</view>
  299. <view class="style_mode {{dingZhiClick == i ? 'active_style' : ''}}"></view>
  300. </block>
  301. <block wx:else>
  302. <view class="color_name {{dingZhiClick == i ? 'active_style' : ''}}">{{item.process_name}}</view>
  303. </block>
  304. <view class="clearfix"></view>
  305. </view>
  306. <!-- 客服 -->
  307. <view class='each_color each_dz_service'>
  308. <button open-type="contact" class='button-image contact_button' plain="true" >
  309. <!-- <button open-type="contact" size="138" class='contact_button'></button> -->
  310. <image class="color_icon" src="/images/bug_dz_service_icon.jpg"></image>
  311. <view class="color_name">联系客服</view>
  312. </button>
  313. </view>
  314. <view class="clearfix"></view>
  315. </view>
  316. </view>
  317. <!-- 数量 -->
  318. <view class="goods_num margintop">购买数量
  319. <view class="goods_num_wrap">
  320. <image bindtap="minusCount" src="{{minNumber >= num?'/images/minus_pre.png':'/images/minus.png'}}" class="num_btn num_btn_left"></image>
  321. <view class="num_num">
  322. <input type='number' bindblur='writeNum' bindconfirm='writeNum' value='{{minNumber}}' />
  323. </view>
  324. <image bindtap="addCount" src="{{minNumber < showNum ? '/images/add_pre.png' : '/images/add.png'}}" class="num_btn num_btn_right"></image>
  325. </view>
  326. </view>
  327. </view>
  328. </view>
  329. <block wx:if="{{soldOutShow}}">
  330. <!-- 下架 -->
  331. <view class='wind_footer_btn wind_footer_no_btn'>商品已经下架啦~</view>
  332. </block>
  333. <block wx:elif="{{sumTotal <= 0}}">
  334. <view class='wind_footer_btn wind_footer_no_btn'>商品已售罄~</view>
  335. </block>
  336. <block wx:else>
  337. <!-- 从选择商品口进入 -->
  338. <view wx:if="{{chooseFlag == 1}}" class='picker_btn_wrap clearfix'>
  339. <view class="wind_footer_btn" data-id="1" bindtap="tz">立 即 购 买</view>
  340. </view>
  341. <!-- footer入口购买 -->
  342. <view wx:else class="wind_footer_btn clearfix" data-id="{{stateId}}" bindtap="tz">确 定</view>
  343. </block>
  344. </view>
  345. </view>
  346. </view>
  347. <view class="modal_wrap {{hiddenmodal ? 'hidden' : ''}}">
  348. <view class="modal {{hiddenmodal ? 'hidden' : ''}}">{{modalCont}}</view>
  349. </view>
  350. <view class='loading_bg {{allHidden}}'></view>
  351. <!-- 回到首页 -->
  352. <view bindtap='backIndex' class="back_btn {{showBtn ? '' : 'back_btn_hidden'}}">
  353. <image src='/images/share_back_index.png' class='back_btn_icon'></image>
  354. </view>