index.wxml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  1. <view class="container p-bottom" wx:if="{{ goods_list.length }}">
  2. <!-- 顶部选项卡 -->
  3. <view wx:if="{{ isShowTab }}" class="swiper-tab dis-flex flex-y-center flex-x-around">
  4. <view wx:for="{{ DeliveryTypeEnum }}" wx:key="this" class="swiper-tab-item {{ curDelivery == item.value ? 'on' : '' }}" data-current="{{ item.value }}" catchtap="onSwichDelivery">
  5. {{ item.name }}
  6. </view>
  7. </view>
  8. <!-- 快递配送:配送地址 -->
  9. <view wx:if="{{ curDelivery == DeliveryTypeEnum.EXPRESS.value }}" catchtap="onSelectAddress" class="flow-delivery">
  10. <view class="flow-delivery__detail dis-flex flex-y-center">
  11. <view class="detail-location dis-flex">
  12. <text class="iconfont icon-dingwei"></text>
  13. </view>
  14. <view class="detail-content flex-box">
  15. <block wx:if="{{ address.address_id }}">
  16. <view class="detail-content__title dis-flex">
  17. <text class="f-30">{{ address.name }}</text>
  18. <text class="detail-content__title-phone f-28">{{ address.phone }}</text>
  19. </view>
  20. <view class="detail-content__describe">
  21. <text class="col-7">{{address.region.province}} {{address.region.city}} {{address.region.region}} {{address.detail}}</text>
  22. </view>
  23. </block>
  24. <block wx:else>
  25. <view class="detail-content__describe dis-flex">
  26. <text class="col-6">请选择配送地址</text>
  27. </view>
  28. </block>
  29. </view>
  30. <view class="detail-arrow dis-flex">
  31. <text class="iconfont icon-xiangyoujiantou user-orderJtou"></text>
  32. </view>
  33. </view>
  34. </view>
  35. <!-- 上门自提:自提门店 -->
  36. <block wx:if="{{ curDelivery == DeliveryTypeEnum.EXTRACT.value }}">
  37. <view catchtap="onSelectExtractPoint" class="flow-delivery">
  38. <view class="flow-delivery__detail dis-flex flex-y-center">
  39. <view class="detail-location dis-flex">
  40. <text class="iconfont icon-dingwei"></text>
  41. </view>
  42. <view class="detail-content flex-box">
  43. <block wx:if="{{ extract_shop.shop_id }}">
  44. <view class="detail-content__title dis-flex">
  45. <text class="f-30">{{ extract_shop.shop_name }}</text>
  46. </view>
  47. <view class="detail-content__describe">
  48. <text class="col-7">{{extract_shop.region.province}} {{extract_shop.region.city}} {{extract_shop.region.region}} {{extract_shop.address}}</text>
  49. </view>
  50. </block>
  51. <block wx:else>
  52. <view class="detail-content__describe dis-flex">
  53. <text class="col-6">请选择自提点</text>
  54. </view>
  55. </block>
  56. </view>
  57. <view class="detail-arrow dis-flex">
  58. <text class="iconfont icon-xiangyoujiantou user-orderJtou"></text>
  59. </view>
  60. </view>
  61. </view>
  62. <!-- 自提联系方式 -->
  63. <view class="flow-extract-contact m-top20 b-f">
  64. <view class="contact-item dis-flex">
  65. <view class="item_label dis-flex flex-x-end flex-y-center">
  66. <text>联系人:</text>
  67. </view>
  68. <view class="item_ipt flex-box dis-flex flex-y-center">
  69. <input placeholder="请填写联系人姓名" bindinput="onInputLinkman" value="{{ linkman }}"></input>
  70. </view>
  71. </view>
  72. <view class="contact-item dis-flex">
  73. <view class="item_label dis-flex flex-x-end flex-y-center">
  74. <text>联系电话:</text>
  75. </view>
  76. <view class="item_ipt flex-box dis-flex flex-y-center">
  77. <input placeholder="请填写联系电话" bindinput="onInputPhone" value="{{ phone }}"></input>
  78. </view>
  79. </view>
  80. </view>
  81. </block>
  82. <!-- 商品列表 -->
  83. <view class="m-top20">
  84. <view class="checkout_list" wx:for="{{ goods_list }}" wx:key="this">
  85. <form bindsubmit="onTargetGoods" data-id="{{ item.goods_id }}" report-submit="true">
  86. <button formType="submit" class="btn-normal">
  87. <view class="flow-shopList dis-flex" data-index="{{index}}">
  88. <!-- 商品图片 -->
  89. <view class="flow-list-left">
  90. <image mode="scaleToFill" src="{{ item.goods_image }}"></image>
  91. </view>
  92. <view class="flow-list-right flex-box">
  93. <!-- 商品名称 -->
  94. <text class="f-30 col-3 twolist-hidden">{{item.goods_name}}</text>
  95. <!-- 商品sku信息 -->
  96. <text class="f-24 col-7">{{item.goods_sku.goods_attr}}</text>
  97. <!-- 商品数量和单价 -->
  98. <view class="flow-list-cont dis-flex flex-x-between flex-y-center">
  99. <text class="small">×{{item.total_num}}</text>
  100. <text class="flow-cont {{ item.is_user_grade ? 'price-delete' : '' }}">¥{{item.goods_price}}</text>
  101. </view>
  102. <!-- 会员折扣价 -->
  103. <view wx:if="{{ item.is_user_grade }}" class="grade-price">
  104. <text>会员折扣价:¥{{ item.grade_goods_price }}</text>
  105. </view>
  106. </view>
  107. </view>
  108. </button>
  109. </form>
  110. </view>
  111. <view class="flow-num-box b-f padding-box">
  112. <text>共{{ order_total_num }}件商品,合计:</text>
  113. <text class="flow-money col-m">¥{{ order_total_price }}</text>
  114. </view>
  115. </view>
  116. <!-- 商品金额 -->
  117. <view class="flow-all-money b-f m-top20">
  118. <view class="flow-all-list dis-flex">
  119. <text class="flex-five">订单总金额:</text>
  120. <view class="flex-five t-r">
  121. <text class="col-m">¥{{ order_total_price }}</text>
  122. </view>
  123. </view>
  124. <!-- 优惠券 -->
  125. <view class="flow-all-list dis-flex">
  126. <text class="flex-five">优惠券:</text>
  127. <view class="flex-five t-r">
  128. <view class="flow-list-coupon" catchtap="onTogglePopupCoupon">
  129. <block wx:if="{{ coupon_list.length > 0 }}">
  130. <text class="col-m" wx:if="{{ coupon_id > 0 }}">-¥{{ coupon_money }}</text>
  131. <text class="col-m" wx:else>有{{ coupon_list.length }}张优惠券可用</text>
  132. <text class="iconfont icon-xiangyoujiantou user-orderJtou"></text>
  133. </block>
  134. <text wx:else class="">无优惠券可用</text>
  135. </view>
  136. </view>
  137. </view>
  138. <!-- 积分抵扣 -->
  139. <view wx:if="{{ is_allow_points }}" class="points flow-all-list dis-flex flex-y-center">
  140. <view class="block-left flex-five">
  141. <form class="flex-five" bindsubmit="onShowPoints" report-submit="true">
  142. <button formType="submit" class="btn-normal">
  143. <text class="title">可用{{ setting.points_name }}抵扣:</text>
  144. <text class="iconfont icon-help"></text>
  145. </button>
  146. </form>
  147. </view>
  148. <view class="flex-five dis-flex flex-x-end flex-y-center">
  149. <text class="points-money col-m">¥{{ points_money }}</text>
  150. <van-switch checked="{{ isUsePoints }}" size="48rpx" active-color="#07c160" bind:change="onTriggerPoints" />
  151. </view>
  152. </view>
  153. <!-- 配送费用 -->
  154. <view wx:if="{{ curDelivery == DeliveryTypeEnum.EXPRESS.value }}" class="dis-flex flow-all-list">
  155. <text class="flex-five">配送费用:</text>
  156. <view class="flex-five t-r">
  157. <view wx:if="{{address.address_id}}">
  158. <text class="col-m" wx:if="{{intra_region}}">+¥{{express_price}}</text>
  159. <text wx:else>不在配送范围</text>
  160. </view>
  161. <view wx:else>
  162. <text class="col-7">请先选择配送地址</text>
  163. </view>
  164. </view>
  165. </view>
  166. </view>
  167. <!-- 支付方式 -->
  168. <view class="pay-method flow-all-money b-f m-top20">
  169. <view class="flow-all-list dis-flex">
  170. <text class="flex-five">支付方式</text>
  171. </view>
  172. <form bindsubmit="onSelectPayType" data-value="{{ PayTypeEnum.WECHAT.value }}" report-submit="true">
  173. <button formType="submit" class="btn-normal">
  174. <view class="pay-item dis-flex flex-x-between">
  175. <view class="item-left dis-flex flex-y-center">
  176. <view class="item-left_icon wechat">
  177. <text class="iconfont icon-weixinzhifu"></text>
  178. </view>
  179. <view class="item-left_text">
  180. <text>{{ PayTypeEnum.WECHAT.name }}</text>
  181. </view>
  182. </view>
  183. <view class="item-right col-m" wx:if="{{ curPayType == PayTypeEnum.WECHAT.value }}">
  184. <text class="iconfont icon-duihao"></text>
  185. </view>
  186. </view>
  187. </button>
  188. </form>
  189. <form bindsubmit="onSelectPayType" data-value="{{ PayTypeEnum.BALANCE.value }}" report-submit="true">
  190. <button formType="submit" class="btn-normal">
  191. <view class="pay-item dis-flex flex-x-between">
  192. <view class="item-left dis-flex flex-y-center">
  193. <view class="item-left_icon balance">
  194. <text class="iconfont icon-qiandai"></text>
  195. </view>
  196. <view class="item-left_text">
  197. <text>{{ PayTypeEnum.BALANCE.name }}</text>
  198. </view>
  199. </view>
  200. <view class="item-right col-m" wx:if="{{ curPayType == PayTypeEnum.BALANCE.value }}">
  201. <text class="iconfont icon-duihao"></text>
  202. </view>
  203. </view>
  204. </button>
  205. </form>
  206. </view>
  207. <!-- 买家留言 -->
  208. <view class="flow-all-money b-f m-top20">
  209. <view class="ipt-wrapper dis-flex flow-all-list">
  210. <input bindinput="bindRemark" placeholder="选填:买家留言(50字以内)" value="{{remark}}"></input>
  211. </view>
  212. </view>
  213. <!-- 提交订单 -->
  214. <view class="flow-fixed-footer b-f m-top10">
  215. <view class="dis-flex chackout-box">
  216. <view class="chackout-left pl-12 ">实付款:
  217. <text class="col-m">¥{{ order_pay_price }}</text>
  218. </view>
  219. <view catchtap="onSubmitOrder" class="chackout-right">
  220. <text class="flow-btn">提交订单</text>
  221. </view>
  222. </view>
  223. </view>
  224. <!-- 优惠券弹出框 -->
  225. <zan-popup show="{{ showBottomPopup }}" type="bottom" bindclose="onTogglePopupCoupon">
  226. <view class="popup__coupon">
  227. <view class="coupon__title f-32">选择优惠券</view>
  228. <!-- 优惠券列表 -->
  229. <view class="coupon-list">
  230. <scroll-view scroll-y="{{ true }}" style="height: 565rpx;">
  231. <view class="coupon-item" wx:for="{{ coupon_list }}" wx:key="this">
  232. <view class="item-wrapper color__{{ item.color.text }}" catchtap="onSelectCoupon" data-index="{{ index }}" data-id="{{ item.user_coupon_id }}">
  233. <view class="coupon-type">{{ item.coupon_type.text }}</view>
  234. <view class="tip dis-flex flex-dir-column flex-x-center">
  235. <view wx:if="{{ item.coupon_type.value == 10 }}">
  236. <text class="f-30">¥</text>
  237. <text class="money">{{ item.reduce_price }}</text>
  238. </view>
  239. <text class="money" wx:if="{{ item.coupon_type.value == 20 }}">{{ item.discount }}折</text>
  240. <text class="pay-line">满{{ item.min_price }}元可用</text>
  241. </view>
  242. <view class="split-line"></view>
  243. <view class="content dis-flex flex-dir-column flex-x-between">
  244. <view class="title">{{ item.name }}</view>
  245. <view class="bottom dis-flex flex-y-center">
  246. <view class="time flex-box">
  247. <text>有效期:{{ item.start_time.text }}~{{ item.end_time.text }}</text>
  248. </view>
  249. <!-- <view class="state flex-box">
  250. <text>-¥{{ item.reduced_price }}</text>
  251. </view> -->
  252. </view>
  253. </view>
  254. </view>
  255. </view>
  256. </scroll-view>
  257. </view>
  258. <!-- 不使用优惠券 -->
  259. <view class="coupon__do_not dis-flex flex-y-center flex-x-center">
  260. <view class="control dis-flex flex-y-center flex-x-center" catchtap="onNotUseCoupon">
  261. <text class="f-26">不使用优惠券</text>
  262. </view>
  263. </view>
  264. <!-- <view class="footer-fixed f-32">
  265. <view catchtap="onTogglePopupCoupon" class="order-bt" style="width:100%">关闭</view>
  266. </view> -->
  267. </view>
  268. </zan-popup>
  269. <!-- 积分说明弹框 -->
  270. <zan-dialog id="zan-base-dialog"></zan-dialog>
  271. </view>
  272. <!-- 快捷导航 -->
  273. <!-- <shortcut></shortcut> -->