order.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946
  1. <template>
  2. <view>
  3. <view class="custom_addr" @click="showAddrPopup()">
  4. <view class="contact_user">
  5. <text class="contact_none" v-if="!checkedAddr.id">请选择收货地址</text>
  6. <text class="contact_name">{{checkedAddr.contact_name}}</text>
  7. <text class="contact_phone">{{checkedAddr.contact_phone}}</text>
  8. <text class="contact_more"> &gt;</text>
  9. <text class="contact_shop">{{checkedAddr.contact_shop}}</text>
  10. </view>
  11. <view class="contact_addr">
  12. {{checkedAddr.contact_province}} {{checkedAddr.contact_city}} {{checkedAddr.contact_area}}
  13. {{checkedAddr.contact_addr}}
  14. </view>
  15. </view>
  16. <view class="car_list">
  17. <view class="car_item" v-for="(item,index) in cartList" :key="index">
  18. <view class="box_left">
  19. <image class="car_image" :src="item.thumb" mode=""></image>
  20. </view>
  21. <view class="box_center">
  22. <view class="car_name">{{item.name}}</view>
  23. <view class="car_spec">{{item.spec}}</view>
  24. <view v-if="item.promo_title" class="promo_title">{{item.promo_title}}</view>
  25. <view class="car_price">
  26. <text class="price">¥{{item.price}}</text>
  27. </view>
  28. </view>
  29. <view class="box_right">
  30. <view class="buy_num_box">
  31. <view class="buy_num">共{{item.buy_num}}件</view>
  32. </view>
  33. </view>
  34. </view>
  35. <view class="car_item" v-for="(item,index) in promoRebateList" :key="index">
  36. <view class="box_left">
  37. <image class="car_image" :src="item.thumb" mode=""></image>
  38. </view>
  39. <view class="box_center">
  40. <view class="car_name"><text v-if="item.promo_rebate_id">【赠品】</text>{{item.name}}</view>
  41. <view class="car_spec">{{item.spec}}</view>
  42. <view class="car_price">
  43. <text class="price">¥{{item.price}}</text>
  44. </view>
  45. </view>
  46. <view class="box_right">
  47. <view class="buy_num_box">
  48. <view class="buy_num">共{{item.buy_num}}件</view>
  49. </view>
  50. </view>
  51. </view>
  52. </view>
  53. <view>
  54. <view class="to_select_coupon" v-if="couponList.length" @click="popupCoupon()">
  55. <text>优惠券</text>
  56. <view class="coupon_deduction">{{couponUsed}}</view>
  57. </view>
  58. <view class="to_select_coupon" v-if="reduction > 0">
  59. <text>满减</text>
  60. <view class="coupon_deduction">-{{reduction}}</view>
  61. </view>
  62. <view class="to_select_coupon" v-if="discount > 0">
  63. <text>商品折扣</text>
  64. <view class="coupon_deduction">-{{discount}}</view>
  65. </view>
  66. </view>
  67. <view class="bottom_box">
  68. <view class="price_box">
  69. 合计:<text class="price_total">¥{{priceTotal}}</text>
  70. </view>
  71. <button class="to_order" @click="createOrder()" data-eventsync="true">提交预约</button>
  72. </view>
  73. <uni-popup ref="popup" type="bottom" class="popup" background-color="#FFFFFF" @touchmove.stop.prevent="()=>{}">
  74. <view class="coupon_list">
  75. <view class="coupon_item" v-for="(item,index) in couponList" :key="index" @click="checkedCoupon(index)">
  76. <view class="box_left">
  77. <view class="rebate" v-if="item.rebate_type == 1"> ¥{{item.rebate}}</view>
  78. <view class="rebate" v-if="item.rebate_type == 2"> 打 {{item.rebate}} 折</view>
  79. <view class="rebate" v-if="item.rebate_type == 3">
  80. <text v-if="item.rebate_scope.length"> {{item.rebate_scope[0].product_name}} </text>
  81. </view>
  82. <view class="std_pay"> 满{{item.std_pay}}</view>
  83. </view>
  84. <view class="box_right">
  85. <view class="coupon_title">
  86. <view class="coupon_name" v-if="item.rebate_type == 1">满减券</view>
  87. <view class="coupon_name" v-if="item.rebate_type == 2">折扣券</view>
  88. <view class="coupon_name" v-if="item.rebate_type == 3">赠品券</view>
  89. </view>
  90. <view class="product_scope">
  91. <text class="" v-if="item.type_id == 1">限定商品可用</text>
  92. <text class="" v-if="item.type_id == 2">全场可用</text>
  93. <view class="check_label">
  94. <view class="isstd" v-if="!item.is_std">不可用</view>
  95. <image class="checkbox" v-if="item.is_std"
  96. :src="item.checked?'../../static/icon/checked.png':'../../static/icon/checkbox.png'">
  97. </image>
  98. </view>
  99. </view>
  100. <view class="coupon_info">
  101. <view class="coupon_exp">{{item.exp_time}} 到期</view>
  102. </view>
  103. </view>
  104. </view>
  105. </view>
  106. </uni-popup>
  107. <uni-popup ref="addrPopup" type="bottom" class="popup" background-color="#FFFFFF">
  108. <view class="popup_title">收货地址 <navigator url="/pages/addr/index?notify=addr" class="to_addr_page">管理
  109. </navigator>
  110. </view>
  111. <view class="addr_list">
  112. <view class="addr_item" v-for="(item,index) in addrList" :key="index" @click="checkedAddrItem(item)">
  113. <view class="radio_label">
  114. <image class="radio_icon"
  115. :src="item.id == checkedAddr.id? '../../static/icon/radioed.png' : '../../static/icon/radio.png'">
  116. </image>
  117. </view>
  118. <view class="contact_user">
  119. <text class="contact_name">{{item.contact_name}}</text>
  120. <text class="contact_phone">{{item.contact_phone}}</text>
  121. <text class="contact_default" v-if="item.is_default">默认</text>
  122. </view>
  123. <view class="contact_addr">
  124. {{item.contact_province}} {{item.contact_city}} {{item.contact_area}} {{item.contact_addr}}
  125. </view>
  126. </view>
  127. </view>
  128. <view class="create_box">
  129. <navigator url="/pages/addr/index?notify=addr&type=create" class="create_addr">新建收货地址</navigator>
  130. </view>
  131. </uni-popup>
  132. </view>
  133. </template>
  134. <script>
  135. export default {
  136. data() {
  137. return {
  138. // 购物车列表
  139. cartList: [],
  140. // 优惠券列表
  141. couponList: [],
  142. //赠品列表
  143. promoRebateList: [],
  144. // 请求参数
  145. requestParam: {
  146. cart_ids: "",
  147. },
  148. // 总价
  149. priceTotal: '0.00',
  150. discount: '0.00',
  151. reduction: '0.00',
  152. // 优惠券使用
  153. couponUsed: "去使用 >",
  154. // 扣减金额
  155. rebatePrice: 0.00,
  156. // 已经选择的优惠券ID
  157. customCoupon: 0,
  158. // 地址列表
  159. addrList: [],
  160. // 已选地址
  161. checkedAddr: {
  162. id: 0,
  163. contact_name: "",
  164. contact_phone: "",
  165. contact_province: "",
  166. contact_city: "",
  167. contact_area: "",
  168. contact_addr: "",
  169. is_default: 0,
  170. }
  171. }
  172. },
  173. onLoad(param) {
  174. // 获取路由参数
  175. this.requestParam.cart_ids = param.cart_ids;
  176. var that = this;
  177. // 监听地址变动
  178. uni.$on('addr_list_change', function(data) {
  179. // 地址列表
  180. that.addrList = data.list;
  181. })
  182. },
  183. onShow() {
  184. // 结果
  185. this.$http.request('api/shop_cart/check_list', this.requestParam).then((re) => {
  186. if (re.code == 'success') {
  187. // 赋值
  188. this.cartList = re.data;
  189. this.promoRebateList = re.promoRebateList;
  190. this.discount = re.discount;
  191. this.reduction = re.reduction;
  192. // 结果
  193. this.$http.request('api/custom_coupon/get_checked', this.requestParam).then((re) => {
  194. if (re.code == 'success') {
  195. // 赋值
  196. this.couponList = re.data;
  197. // 推荐使用的优惠券
  198. let rebatePrice = 0;
  199. // 循环优惠券
  200. for (let i in this.couponList) {
  201. /* 商品的总价格,决定是否可用 */
  202. var totalPrice = 0.00;
  203. // 循环产品,
  204. for (let j in this.cartList) {
  205. // 如果是商品券
  206. if (this.couponList[i].type_id == 1) {
  207. // 判断商品是不是在商品范围
  208. var isScope = false;
  209. // 循环商品范围
  210. for (let k in this.couponList[i].product_scope) {
  211. // 如果存在商品范围
  212. if (this.couponList[i].product_scope[k].product_id == this
  213. .cartList[j].product_id) isScope = true;
  214. }
  215. // 范围内的做计算
  216. if (isScope) {
  217. totalPrice = this.$decimal.add(totalPrice, this.$decimal.mul(
  218. this.cartList[j].price, this.cartList[j].buy_num));
  219. }
  220. // 如果排除商品
  221. } else if (this.couponList[i].type_id == 3) {
  222. // 判断商品是不是在排除范围
  223. var isExclude = false;
  224. // 循环排除范围
  225. for (let k in this.couponList[i].product_exclude) {
  226. // 如果存在排除范围
  227. if (this.couponList[i].product_exclude[k].product_id == this
  228. .cartList[j].product_id) isExclude = true;
  229. }
  230. // 不在排除内的做计算
  231. if (!isExclude) {
  232. totalPrice = this.$decimal.add(totalPrice, this.$decimal.mul(
  233. this.cartList[j].price, this.cartList[j].buy_num));
  234. }
  235. // 店铺券
  236. } else {
  237. // 折扣券以及满减券的话,计算价格
  238. totalPrice = this.$decimal.add(totalPrice, this.$decimal.mul(this
  239. .cartList[j].price, this.cartList[j].buy_num));
  240. }
  241. // 判断价格到不到限额
  242. this.couponList[i].is_std = parseFloat(totalPrice.toFixed(2)) >=
  243. parseFloat(this.$decimal.mul(this.couponList[i].std_pay, 1)
  244. .toFixed(2));
  245. // 如果可用的话,并且没有主动选择优惠券
  246. if (this.couponList[i].is_std) {
  247. // 优惠金额
  248. let newRebatePrice = 0.00;
  249. // 计算满减价格
  250. if (this.couponList[i].rebate_type == 1) {
  251. // 计算扣减数据
  252. newRebatePrice = this.$decimal.mul(this.couponList[i].rebate,
  253. 1);
  254. }
  255. // 计算折扣价格
  256. if (this.couponList[i].rebate_type == 2) {
  257. // 折扣
  258. newRebatePrice = this.$decimal.mul(totalPrice, this.couponList[
  259. i].rebate);
  260. // 减数
  261. newRebatePrice = this.$decimal.sub(totalPrice, newRebatePrice
  262. .mul(0.1));
  263. }
  264. // 判断哪个比较优惠
  265. if (parseFloat(rebatePrice.toFixed(2)) < parseFloat(newRebatePrice
  266. .toFixed(2))) {
  267. // 覆盖价格
  268. rebatePrice = parseFloat(newRebatePrice.toFixed(2));
  269. // 选中
  270. this.checkedCoupon(i);
  271. }
  272. }
  273. }
  274. }
  275. }
  276. });
  277. // 计算价格
  278. this.priceHandler();
  279. }
  280. });
  281. // 地址列表
  282. this.getAddrList();
  283. },
  284. methods: {
  285. // 地址弹出层
  286. showAddrPopup() {
  287. // 显示下单弹出层
  288. this.$refs.addrPopup.open('bottom');
  289. },
  290. // 价格计算
  291. priceHandler() {
  292. // 总价格
  293. let priceTotal = 0;
  294. // 循环处理
  295. for (let index in this.cartList) {
  296. priceTotal = this.$decimal.add(priceTotal, this.$decimal.mul(this.cartList[index].price, this.cartList[
  297. index].buy_num));
  298. }
  299. // 扣减数据
  300. priceTotal = this.$decimal.sub(priceTotal, this.rebatePrice);
  301. priceTotal = this.$decimal.sub(priceTotal, this.reduction);
  302. priceTotal = this.$decimal.sub(priceTotal, this.discount);
  303. // 小数点保留
  304. this.priceTotal = priceTotal.toFixed(2)
  305. },
  306. // 创建订单
  307. createOrder() {
  308. // 不可预约
  309. if (!this.$checkAccess.alertCity()) return;
  310. // 需要下单的产品列表
  311. let productList = [];
  312. // 循环列表数据
  313. for (let index in this.cartList) {
  314. // 购买数量必须大于0的才行
  315. if (this.cartList[index].buy_num > 0) {
  316. // 追加需要下单的数据
  317. productList.push({
  318. product_id: this.cartList[index].product_id,
  319. buy_num: this.cartList[index].buy_num,
  320. product_skuid: this.cartList[index].skuid
  321. });
  322. }
  323. }
  324. if (productList.length <= 0) {
  325. uni.showToast({
  326. title: "未选择可预约的产品",
  327. icon: "none",
  328. })
  329. return;
  330. }
  331. // 地址未填
  332. if (!this.checkedAddr.id) {
  333. uni.showToast({
  334. title: "请选择收货地址",
  335. icon: "none"
  336. })
  337. return;
  338. }
  339. //需要下单的产品信息参数传给OrederCompletion页面
  340. let productInfo = [];
  341. for (let index in this.cartList) {
  342. // 购买数量必须大于0的才行
  343. if (this.cartList[index].buy_num > 0) {
  344. // 追加需要下单的数据
  345. productInfo.push({
  346. name: this.cartList[index].name,
  347. spec: this.cartList[index].spec,
  348. price: this.cartList[index].price
  349. });
  350. }
  351. }
  352. // 转成json字符串
  353. productInfo = JSON.stringify(productInfo);
  354. //加密json格式成编码数组
  355. let encodedArray = encodeURIComponent(productInfo);
  356. // 转成json字符串传输
  357. productList = JSON.stringify(productList);
  358. // 请求接口
  359. this.$http.request('api/orders/create', {
  360. "product_list": productList,
  361. 'custom_coupon_id': this.customCoupon,
  362. 'is_cart': 1,
  363. 'addr_id': this.checkedAddr.id
  364. }, 'post').then((re) => {
  365. // 判断结果
  366. if (re.code == 'success') {
  367. // 跳转到报单完成页面
  368. uni.redirectTo({
  369. url: `/pages/orders/completion?params=${encodedArray}`
  370. })
  371. return;
  372. } else {
  373. uni.showToast({
  374. title: re.msg,
  375. icon: "none"
  376. })
  377. }
  378. });
  379. },
  380. // 弹出优惠券
  381. popupCoupon() {
  382. this.$refs.popup.open();
  383. },
  384. // 选择优惠券
  385. checkedCoupon(index) {
  386. // 单个设置选中/未选
  387. this.couponList[index].checked = this.couponList[index].checked ? 0 : 1;
  388. // 循环处理
  389. for (let i in this.couponList) {
  390. // 有未选的就不做全选
  391. if (index != i) this.couponList[i].checked = 0;
  392. }
  393. // 如果未选中,提示可用
  394. if (!this.couponList[index].checked) this.couponUsed = '去使用 >';
  395. // 已经选择的优惠券ID
  396. this.customCoupon = this.couponList[index].checked ? this.couponList[index].id : 0
  397. // 计算扣减
  398. this.couponRebate();
  399. // 计算价格
  400. this.priceHandler();
  401. // 关闭弹窗
  402. this.$refs.popup.close();
  403. },
  404. // 计算优惠券扣减
  405. couponRebate() {
  406. // 默认扣减0
  407. this.rebatePrice = 0;
  408. // 循环优惠券
  409. for (let i in this.couponList) {
  410. // 判断是否选中
  411. if (!this.couponList[i].checked) {
  412. // 未选择的不管
  413. continue;
  414. }
  415. /* 商品的总价格,决定是否可用 */
  416. var totalPrice = 0.00;
  417. // 循环产品,
  418. for (let j in this.cartList) {
  419. // 如果是商品券
  420. if (this.couponList[i].type_id == 1) {
  421. // 判断商品是不是在商品范围
  422. var isScope = false;
  423. // 循环商品范围
  424. for (let k in this.couponList[i].product_scope) {
  425. // 如果存在商品范围
  426. if (this.couponList[i].product_scope[k].product_id == this.cartList[j].product_id)
  427. isScope = true;
  428. }
  429. // 范围内的做计算
  430. if (isScope) totalPrice = this.$decimal.add(totalPrice, this.$decimal.mul(this.cartList[j]
  431. .price, this.cartList[j].buy_num));
  432. // 店铺券
  433. } else {
  434. // 折扣券以及满减券的话,计算价格
  435. totalPrice = this.$decimal.add(totalPrice, this.$decimal.mul(this.cartList[j].price, this
  436. .cartList[j].buy_num));
  437. }
  438. }
  439. // 如果是可以用的话
  440. if (parseFloat(totalPrice.toFixed(2)) >= parseFloat(this.$decimal.mul(this.couponList[i].std_pay, 1)
  441. .toFixed(2))) {
  442. // 扣减金额
  443. let rebatePrice = 0;
  444. // 满减
  445. if (this.couponList[i].rebate_type == 1) {
  446. // 计算扣减数据
  447. rebatePrice = this.$decimal.mul(this.couponList[i].rebate, 1);
  448. // 替换文字
  449. this.couponUsed = "¥-" + rebatePrice.toFixed(2);
  450. }
  451. // 折扣
  452. if (this.couponList[i].rebate_type == 2) {
  453. // 折扣
  454. rebatePrice = this.$decimal.mul(totalPrice, this.couponList[i].rebate);
  455. // -0.1 表示折扣
  456. rebatePrice = this.$decimal.sub(totalPrice, rebatePrice.mul(0.1));
  457. // 替换文字
  458. this.couponUsed = "¥-" + rebatePrice.toFixed(2);
  459. }
  460. // 赠品
  461. if (this.couponList[i].rebate_type == 3) {
  462. // 替换文字
  463. this.couponUsed = "送" + (this.couponList[i].rebate_scope.length ? this.couponList[i]
  464. .rebate_scope[0].product_name : "");
  465. }
  466. // 小数点保留
  467. this.rebatePrice = rebatePrice.toFixed(2);
  468. }
  469. }
  470. },
  471. // 选择地址
  472. checkedAddrItem(item) {
  473. this.checkedAddr = item;
  474. this.$refs.addrPopup.close();
  475. },
  476. getAddrList() {
  477. // 判断数据
  478. this.$http.request('api/custom_addr/get_list').then((callback) => {
  479. // 获取成功
  480. if (callback.code == 'success') {
  481. this.addrList = callback.data;
  482. // 如果有的话
  483. if (this.addrList.length) {
  484. // 获取默认的
  485. for (let i in this.addrList) {
  486. // 如果是默认的
  487. if (this.addrList[i].is_default) this.checkedAddr = this.addrList[i];
  488. }
  489. // 如果没有默认的话
  490. if (!this.checkedAddr.id) {
  491. this.checkedAddr = this.addrList[this.addrList.length - 1];
  492. }
  493. }
  494. }
  495. });
  496. }
  497. }
  498. }
  499. </script>
  500. <style lang="less">
  501. .custom_addr {
  502. width: 680rpx;
  503. display: block;
  504. font-size: 24rpx;
  505. overflow: hidden;
  506. margin: 0rpx auto;
  507. line-height: 40rpx;
  508. padding: 20rpx 35rpx;
  509. background-color: #FFFFFF;
  510. border-bottom: 2rpx solid #dddddd;
  511. .contact_user {
  512. display: block;
  513. font-size: 24rpx;
  514. line-height: 50rpx;
  515. .contact_none {
  516. font-size: 26rpx;
  517. font-weight: bold;
  518. }
  519. .contact_name {
  520. font-size: 26rpx;
  521. font-weight: bold;
  522. margin-right: 16rpx;
  523. }
  524. .contact_more {
  525. float: right;
  526. font-size: 40rpx;
  527. font-weight: bold;
  528. }
  529. .contact_shop {
  530. float: right;
  531. font-size: 26rpx;
  532. margin-right: 16rpx;
  533. }
  534. }
  535. .contact_addr {
  536. width: 620rpx;
  537. display: block;
  538. font-size: 24rpx;
  539. line-height: 30rpx;
  540. padding: 10rpx 5rpx;
  541. }
  542. }
  543. .car_list {
  544. display: block;
  545. overflow: hidden;
  546. margin: 0rpx auto;
  547. margin-top: 20rpx;
  548. background: #FFFFFF;
  549. .car_item {
  550. height: 170rpx;
  551. display: block;
  552. overflow: hidden;
  553. margin: 0rpx auto;
  554. padding: 20rpx 35rpx;
  555. border-bottom: 2rpx solid #DDDDDD;
  556. .box_left {
  557. float: left;
  558. width: 140rpx;
  559. height: 190rpx;
  560. margin-top: 10rpx;
  561. .car_image {
  562. width: 140rpx;
  563. height: 140rpx;
  564. border-radius: 5rpx;
  565. }
  566. }
  567. .box_center {
  568. float: left;
  569. width: 300rpx;
  570. margin-left: 25rpx;
  571. .car_name {
  572. max-height: 70rpx;
  573. font-size: 30rpx;
  574. line-height: 40rpx;
  575. overflow: hidden;
  576. white-space: nowrap;
  577. /* 不换行 */
  578. overflow: hidden;
  579. /* 隐藏超出的内容 */
  580. text-overflow: ellipsis;
  581. /* 用省略号表示被隐藏的部分 */
  582. }
  583. .car_spec {
  584. color: #999999;
  585. font-size: 24rpx;
  586. line-height: 60rpx;
  587. max-height: 60rpx;
  588. overflow: hidden;
  589. }
  590. .promo_title {
  591. max-height: 80rpx;
  592. font-size: 20rpx;
  593. line-height: 40rpx;
  594. overflow: hidden;
  595. padding: 0rpx 0rpx;
  596. color: #dd524d;
  597. }
  598. .car_price {
  599. font-size: 30rpx;
  600. line-height: 60rpx;
  601. .price {
  602. color: red;
  603. }
  604. }
  605. }
  606. .box_right {
  607. float: right;
  608. width: 185rpx;
  609. .buy_num_box {
  610. float: right;
  611. color: #333333;
  612. overflow: hidden;
  613. font-size: 24rpx;
  614. margin-top: 130rpx;
  615. text-align: center;
  616. .buy_num {
  617. float: left;
  618. width: 100rpx;
  619. height: 30rpx;
  620. font-size: 24rpx;
  621. line-height: 30rpx;
  622. padding: 0rpx 0rpx;
  623. border-radius: 8rpx;
  624. }
  625. }
  626. }
  627. }
  628. .car_item:last-child {
  629. border-bottom: none;
  630. }
  631. }
  632. .to_select_coupon{
  633. display: block;
  634. height: 120rpx;
  635. font-size: 30rpx;
  636. margin: 20rpx auto;
  637. background: #FFFFFF;
  638. padding: 0rpx 35rpx;
  639. line-height: 120rpx;
  640. .coupon_deduction {
  641. color: red;
  642. float: right;
  643. font-size: 26rpx;
  644. }
  645. }
  646. .to_select_coupon:last-child{
  647. margin-bottom: 160rpx;
  648. }
  649. .bottom_box {
  650. left: 0rpx;
  651. z-index: 9;
  652. width: 100%;
  653. height: 140rpx;
  654. display: block;
  655. position: fixed;
  656. overflow: hidden;
  657. background: #FFFFFF;
  658. padding: 0rpx 35rpx;
  659. bottom: var(--window-bottom);
  660. .price_box {
  661. float: left;
  662. width: 500rpx;
  663. display: block;
  664. color: #666666;
  665. font-size: 26rpx;
  666. text-align: right;
  667. line-height: 100rpx;
  668. margin-right: 20rpx;
  669. .price_total {
  670. color: red;
  671. font-size: 30rpx;
  672. }
  673. }
  674. .to_order {
  675. float: left;
  676. width: 180rpx;
  677. height: 80rpx;
  678. display: block;
  679. color: #FFFFFF;
  680. font-size: 28rpx;
  681. margin-top: 10rpx;
  682. line-height: 80rpx;
  683. padding: 0rpx 0rpx;
  684. text-align: center;
  685. border-radius: 40rpx;
  686. background-color: #E03519;
  687. }
  688. }
  689. .popup {
  690. .popup_title {
  691. display: block;
  692. overflow: hidden;
  693. margin: 0rpx auto;
  694. font-size: 36rpx;
  695. height: 120rpx;
  696. line-height: 120rpx;
  697. padding: 0rpx 20rpx;
  698. border-bottom: 10rpx solid #F8F8F8;
  699. .to_addr_page {
  700. float: right;
  701. color: #F59A23;
  702. display: block;
  703. height: 120rpx;
  704. line-height: 120rpx;
  705. font-size: 26rpx;
  706. padding: 0rpx 10rpx;
  707. }
  708. }
  709. .coupon_list {
  710. display: block;
  711. overflow: hidden;
  712. margin: 10rpx auto;
  713. min-height: 600rpx;
  714. background: #FFFFFF;
  715. padding-bottom: 50rpx;
  716. .coupon_item {
  717. height: 200rpx;
  718. display: block;
  719. margin: 10rpx auto;
  720. border-bottom: 2rpx solid #DDDDDD;
  721. .box_left {
  722. float: left;
  723. width: 160rpx;
  724. height: 160rpx;
  725. font-size: 20rpx;
  726. text-align: center;
  727. margin-left: 35rpx;
  728. line-height: 60rpx;
  729. margin-top: 20rpx;
  730. background: pink;
  731. .rebate {
  732. width: 120rpx;
  733. height: 60rpx;
  734. margin: 0rpx auto;
  735. line-height: 60rpx;
  736. margin-top: 20rpx;
  737. overflow: hidden;
  738. white-space: nowrap;
  739. text-overflow: ellipsis;
  740. }
  741. }
  742. .box_right {
  743. float: left;
  744. width: 485rpx;
  745. margin-left: 35rpx;
  746. padding-top: 20rpx;
  747. .coupon_title {
  748. width: 485rpx;
  749. max-height: 80rpx;
  750. font-size: 30rpx;
  751. overflow: hidden;
  752. line-height: 40rpx;
  753. padding: 0rpx 0rpx;
  754. .coupon_name {
  755. float: left;
  756. height: 40rpx;
  757. width: 380rpx;
  758. }
  759. .coupon_status {
  760. width: 85rpx;
  761. float: right;
  762. color: #999999;
  763. font-size: 24rpx;
  764. }
  765. }
  766. .product_scope {
  767. width: 485rpx;
  768. height: 80rpx;
  769. color: #999999;
  770. font-size: 24rpx;
  771. overflow: hidden;
  772. line-height: 80rpx;
  773. .check_label {
  774. float: right;
  775. display: block;
  776. overflow: hidden;
  777. padding: 20rpx 20rpx;
  778. .isstd {
  779. line-height: 40rpx;
  780. }
  781. .checkbox {
  782. float: right;
  783. width: 40rpx;
  784. height: 40rpx;
  785. }
  786. }
  787. }
  788. .coupon_info {
  789. width: 485rpx;
  790. max-height: 80rpx;
  791. font-size: 30rpx;
  792. overflow: hidden;
  793. line-height: 40rpx;
  794. padding: 0rpx 0rpx;
  795. .coupon_exp {
  796. float: left;
  797. font-size: 20rpx;
  798. }
  799. }
  800. }
  801. }
  802. .coupon_item:last-child {
  803. border-bottom: none;
  804. }
  805. }
  806. .addr_list {
  807. width: 730rpx;
  808. display: block;
  809. overflow: hidden;
  810. margin: 0rpx auto;
  811. min-height: 500rpx;
  812. .addr_item {
  813. display: block;
  814. font-size: 24rpx;
  815. overflow: hidden;
  816. line-height: 40rpx;
  817. padding: 15rpx 10rpx;
  818. border-radius: 15rpx;
  819. border-bottom: 2rpx solid #dddddd;
  820. .radio_label {
  821. width: 40rpx;
  822. float: left;
  823. height: 50rpx;
  824. padding-top: 30rpx;
  825. margin-right: 20rpx;
  826. .radio_icon {
  827. float: left;
  828. width: 40rpx;
  829. height: 40rpx;
  830. }
  831. }
  832. .contact_user {
  833. float: left;
  834. width: 640rpx;
  835. display: block;
  836. height: 50rpx;
  837. font-size: 24rpx;
  838. line-height: 50rpx;
  839. .contact_name {
  840. font-size: 26rpx;
  841. font-weight: bold;
  842. margin-right: 16rpx;
  843. }
  844. .contact_default {
  845. color: #F59A23;
  846. font-size: 20rpx;
  847. margin-left: 16rpx;
  848. border: 1rpx solid #F59A23;
  849. }
  850. .contact_shop {
  851. float: right;
  852. font-size: 26rpx;
  853. margin-right: 16rpx;
  854. }
  855. }
  856. .contact_addr {
  857. float: left;
  858. width: 640rpx;
  859. display: block;
  860. font-size: 24rpx;
  861. line-height: 30rpx;
  862. padding: 10rpx 5rpx;
  863. }
  864. }
  865. }
  866. .create_box {
  867. height: 140rpx;
  868. display: block;
  869. .create_addr {
  870. width: 700rpx;
  871. height: 80rpx;
  872. display: block;
  873. color: #FFFFFF;
  874. font-size: 30rpx;
  875. overflow: hidden;
  876. line-height: 80rpx;
  877. padding: 0rpx 0rpx;
  878. text-align: center;
  879. margin: 0rpx auto;
  880. margin-top: 20rpx;
  881. border-radius: 40rpx;
  882. background-color: #E03519;
  883. }
  884. }
  885. }
  886. </style>