order.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947
  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. let orderInfo = re.data;
  369. orderInfo = JSON.stringify(orderInfo)
  370. let params = encodeURIComponent(orderInfo);
  371. uni.navigateTo({url:`/pages/orders/confirm?params=${params}`});
  372. return ;
  373. } else {
  374. uni.showToast({
  375. title: re.msg,
  376. icon: "none"
  377. })
  378. }
  379. });
  380. },
  381. // 弹出优惠券
  382. popupCoupon() {
  383. this.$refs.popup.open();
  384. },
  385. // 选择优惠券
  386. checkedCoupon(index) {
  387. // 单个设置选中/未选
  388. this.couponList[index].checked = this.couponList[index].checked ? 0 : 1;
  389. // 循环处理
  390. for (let i in this.couponList) {
  391. // 有未选的就不做全选
  392. if (index != i) this.couponList[i].checked = 0;
  393. }
  394. // 如果未选中,提示可用
  395. if (!this.couponList[index].checked) this.couponUsed = '去使用 >';
  396. // 已经选择的优惠券ID
  397. this.customCoupon = this.couponList[index].checked ? this.couponList[index].id : 0
  398. // 计算扣减
  399. this.couponRebate();
  400. // 计算价格
  401. this.priceHandler();
  402. // 关闭弹窗
  403. this.$refs.popup.close();
  404. },
  405. // 计算优惠券扣减
  406. couponRebate() {
  407. // 默认扣减0
  408. this.rebatePrice = 0;
  409. // 循环优惠券
  410. for (let i in this.couponList) {
  411. // 判断是否选中
  412. if (!this.couponList[i].checked) {
  413. // 未选择的不管
  414. continue;
  415. }
  416. /* 商品的总价格,决定是否可用 */
  417. var totalPrice = 0.00;
  418. // 循环产品,
  419. for (let j in this.cartList) {
  420. // 如果是商品券
  421. if (this.couponList[i].type_id == 1) {
  422. // 判断商品是不是在商品范围
  423. var isScope = false;
  424. // 循环商品范围
  425. for (let k in this.couponList[i].product_scope) {
  426. // 如果存在商品范围
  427. if (this.couponList[i].product_scope[k].product_id == this.cartList[j].product_id)
  428. isScope = true;
  429. }
  430. // 范围内的做计算
  431. if (isScope) totalPrice = this.$decimal.add(totalPrice, this.$decimal.mul(this.cartList[j]
  432. .price, this.cartList[j].buy_num));
  433. // 店铺券
  434. } else {
  435. // 折扣券以及满减券的话,计算价格
  436. totalPrice = this.$decimal.add(totalPrice, this.$decimal.mul(this.cartList[j].price, this
  437. .cartList[j].buy_num));
  438. }
  439. }
  440. // 如果是可以用的话
  441. if (parseFloat(totalPrice.toFixed(2)) >= parseFloat(this.$decimal.mul(this.couponList[i].std_pay, 1)
  442. .toFixed(2))) {
  443. // 扣减金额
  444. let rebatePrice = 0;
  445. // 满减
  446. if (this.couponList[i].rebate_type == 1) {
  447. // 计算扣减数据
  448. rebatePrice = this.$decimal.mul(this.couponList[i].rebate, 1);
  449. // 替换文字
  450. this.couponUsed = "¥-" + rebatePrice.toFixed(2);
  451. }
  452. // 折扣
  453. if (this.couponList[i].rebate_type == 2) {
  454. // 折扣
  455. rebatePrice = this.$decimal.mul(totalPrice, this.couponList[i].rebate);
  456. // -0.1 表示折扣
  457. rebatePrice = this.$decimal.sub(totalPrice, rebatePrice.mul(0.1));
  458. // 替换文字
  459. this.couponUsed = "¥-" + rebatePrice.toFixed(2);
  460. }
  461. // 赠品
  462. if (this.couponList[i].rebate_type == 3) {
  463. // 替换文字
  464. this.couponUsed = "送" + (this.couponList[i].rebate_scope.length ? this.couponList[i]
  465. .rebate_scope[0].product_name : "");
  466. }
  467. // 小数点保留
  468. this.rebatePrice = rebatePrice.toFixed(2);
  469. }
  470. }
  471. },
  472. // 选择地址
  473. checkedAddrItem(item) {
  474. this.checkedAddr = item;
  475. this.$refs.addrPopup.close();
  476. },
  477. getAddrList() {
  478. // 判断数据
  479. this.$http.request('api/custom_addr/get_list').then((callback) => {
  480. // 获取成功
  481. if (callback.code == 'success') {
  482. this.addrList = callback.data;
  483. // 如果有的话
  484. if (this.addrList.length) {
  485. // 获取默认的
  486. for (let i in this.addrList) {
  487. // 如果是默认的
  488. if (this.addrList[i].is_default) this.checkedAddr = this.addrList[i];
  489. }
  490. // 如果没有默认的话
  491. if (!this.checkedAddr.id) {
  492. this.checkedAddr = this.addrList[this.addrList.length - 1];
  493. }
  494. }
  495. }
  496. });
  497. }
  498. }
  499. }
  500. </script>
  501. <style lang="less">
  502. .custom_addr {
  503. width: 680rpx;
  504. display: block;
  505. font-size: 24rpx;
  506. overflow: hidden;
  507. margin: 0rpx auto;
  508. line-height: 40rpx;
  509. padding: 20rpx 35rpx;
  510. background-color: #FFFFFF;
  511. border-bottom: 2rpx solid #dddddd;
  512. .contact_user {
  513. display: block;
  514. font-size: 24rpx;
  515. line-height: 50rpx;
  516. .contact_none {
  517. font-size: 26rpx;
  518. font-weight: bold;
  519. }
  520. .contact_name {
  521. font-size: 26rpx;
  522. font-weight: bold;
  523. margin-right: 16rpx;
  524. }
  525. .contact_more {
  526. float: right;
  527. font-size: 40rpx;
  528. font-weight: bold;
  529. }
  530. .contact_shop {
  531. float: right;
  532. font-size: 26rpx;
  533. margin-right: 16rpx;
  534. }
  535. }
  536. .contact_addr {
  537. width: 620rpx;
  538. display: block;
  539. font-size: 24rpx;
  540. line-height: 30rpx;
  541. padding: 10rpx 5rpx;
  542. }
  543. }
  544. .car_list {
  545. display: block;
  546. overflow: hidden;
  547. margin: 0rpx auto;
  548. margin-top: 20rpx;
  549. background: #FFFFFF;
  550. .car_item {
  551. height: 170rpx;
  552. display: block;
  553. overflow: hidden;
  554. margin: 0rpx auto;
  555. padding: 20rpx 35rpx;
  556. border-bottom: 2rpx solid #DDDDDD;
  557. .box_left {
  558. float: left;
  559. width: 140rpx;
  560. height: 190rpx;
  561. margin-top: 10rpx;
  562. .car_image {
  563. width: 140rpx;
  564. height: 140rpx;
  565. border-radius: 5rpx;
  566. }
  567. }
  568. .box_center {
  569. float: left;
  570. width: 300rpx;
  571. margin-left: 25rpx;
  572. .car_name {
  573. max-height: 70rpx;
  574. font-size: 30rpx;
  575. line-height: 40rpx;
  576. overflow: hidden;
  577. white-space: nowrap;
  578. /* 不换行 */
  579. overflow: hidden;
  580. /* 隐藏超出的内容 */
  581. text-overflow: ellipsis;
  582. /* 用省略号表示被隐藏的部分 */
  583. }
  584. .car_spec {
  585. color: #999999;
  586. font-size: 24rpx;
  587. line-height: 60rpx;
  588. max-height: 60rpx;
  589. overflow: hidden;
  590. }
  591. .promo_title {
  592. max-height: 80rpx;
  593. font-size: 20rpx;
  594. line-height: 40rpx;
  595. overflow: hidden;
  596. padding: 0rpx 0rpx;
  597. color: #dd524d;
  598. }
  599. .car_price {
  600. font-size: 30rpx;
  601. line-height: 60rpx;
  602. .price {
  603. color: red;
  604. }
  605. }
  606. }
  607. .box_right {
  608. float: right;
  609. width: 185rpx;
  610. .buy_num_box {
  611. float: right;
  612. color: #333333;
  613. overflow: hidden;
  614. font-size: 24rpx;
  615. margin-top: 130rpx;
  616. text-align: center;
  617. .buy_num {
  618. float: left;
  619. width: 100rpx;
  620. height: 30rpx;
  621. font-size: 24rpx;
  622. line-height: 30rpx;
  623. padding: 0rpx 0rpx;
  624. border-radius: 8rpx;
  625. }
  626. }
  627. }
  628. }
  629. .car_item:last-child {
  630. border-bottom: none;
  631. }
  632. }
  633. .to_select_coupon{
  634. display: block;
  635. height: 120rpx;
  636. font-size: 30rpx;
  637. margin: 20rpx auto;
  638. background: #FFFFFF;
  639. padding: 0rpx 35rpx;
  640. line-height: 120rpx;
  641. .coupon_deduction {
  642. color: red;
  643. float: right;
  644. font-size: 26rpx;
  645. }
  646. }
  647. .to_select_coupon:last-child{
  648. margin-bottom: 160rpx;
  649. }
  650. .bottom_box {
  651. left: 0rpx;
  652. z-index: 9;
  653. width: 100%;
  654. height: 140rpx;
  655. display: block;
  656. position: fixed;
  657. overflow: hidden;
  658. background: #FFFFFF;
  659. padding: 0rpx 35rpx;
  660. bottom: var(--window-bottom);
  661. .price_box {
  662. float: left;
  663. width: 500rpx;
  664. display: block;
  665. color: #666666;
  666. font-size: 26rpx;
  667. text-align: right;
  668. line-height: 100rpx;
  669. margin-right: 20rpx;
  670. .price_total {
  671. color: red;
  672. font-size: 30rpx;
  673. }
  674. }
  675. .to_order {
  676. float: left;
  677. width: 180rpx;
  678. height: 80rpx;
  679. display: block;
  680. color: #FFFFFF;
  681. font-size: 28rpx;
  682. margin-top: 10rpx;
  683. line-height: 80rpx;
  684. padding: 0rpx 0rpx;
  685. text-align: center;
  686. border-radius: 40rpx;
  687. background-color: #E03519;
  688. }
  689. }
  690. .popup {
  691. .popup_title {
  692. display: block;
  693. overflow: hidden;
  694. margin: 0rpx auto;
  695. font-size: 36rpx;
  696. height: 120rpx;
  697. line-height: 120rpx;
  698. padding: 0rpx 20rpx;
  699. border-bottom: 10rpx solid #F8F8F8;
  700. .to_addr_page {
  701. float: right;
  702. color: #F59A23;
  703. display: block;
  704. height: 120rpx;
  705. line-height: 120rpx;
  706. font-size: 26rpx;
  707. padding: 0rpx 10rpx;
  708. }
  709. }
  710. .coupon_list {
  711. display: block;
  712. overflow: hidden;
  713. margin: 10rpx auto;
  714. min-height: 600rpx;
  715. background: #FFFFFF;
  716. padding-bottom: 50rpx;
  717. .coupon_item {
  718. height: 200rpx;
  719. display: block;
  720. margin: 10rpx auto;
  721. border-bottom: 2rpx solid #DDDDDD;
  722. .box_left {
  723. float: left;
  724. width: 160rpx;
  725. height: 160rpx;
  726. font-size: 20rpx;
  727. text-align: center;
  728. margin-left: 35rpx;
  729. line-height: 60rpx;
  730. margin-top: 20rpx;
  731. background: pink;
  732. .rebate {
  733. width: 120rpx;
  734. height: 60rpx;
  735. margin: 0rpx auto;
  736. line-height: 60rpx;
  737. margin-top: 20rpx;
  738. overflow: hidden;
  739. white-space: nowrap;
  740. text-overflow: ellipsis;
  741. }
  742. }
  743. .box_right {
  744. float: left;
  745. width: 485rpx;
  746. margin-left: 35rpx;
  747. padding-top: 20rpx;
  748. .coupon_title {
  749. width: 485rpx;
  750. max-height: 80rpx;
  751. font-size: 30rpx;
  752. overflow: hidden;
  753. line-height: 40rpx;
  754. padding: 0rpx 0rpx;
  755. .coupon_name {
  756. float: left;
  757. height: 40rpx;
  758. width: 380rpx;
  759. }
  760. .coupon_status {
  761. width: 85rpx;
  762. float: right;
  763. color: #999999;
  764. font-size: 24rpx;
  765. }
  766. }
  767. .product_scope {
  768. width: 485rpx;
  769. height: 80rpx;
  770. color: #999999;
  771. font-size: 24rpx;
  772. overflow: hidden;
  773. line-height: 80rpx;
  774. .check_label {
  775. float: right;
  776. display: block;
  777. overflow: hidden;
  778. padding: 20rpx 20rpx;
  779. .isstd {
  780. line-height: 40rpx;
  781. }
  782. .checkbox {
  783. float: right;
  784. width: 40rpx;
  785. height: 40rpx;
  786. }
  787. }
  788. }
  789. .coupon_info {
  790. width: 485rpx;
  791. max-height: 80rpx;
  792. font-size: 30rpx;
  793. overflow: hidden;
  794. line-height: 40rpx;
  795. padding: 0rpx 0rpx;
  796. .coupon_exp {
  797. float: left;
  798. font-size: 20rpx;
  799. }
  800. }
  801. }
  802. }
  803. .coupon_item:last-child {
  804. border-bottom: none;
  805. }
  806. }
  807. .addr_list {
  808. width: 730rpx;
  809. display: block;
  810. overflow: hidden;
  811. margin: 0rpx auto;
  812. min-height: 500rpx;
  813. .addr_item {
  814. display: block;
  815. font-size: 24rpx;
  816. overflow: hidden;
  817. line-height: 40rpx;
  818. padding: 15rpx 10rpx;
  819. border-radius: 15rpx;
  820. border-bottom: 2rpx solid #dddddd;
  821. .radio_label {
  822. width: 40rpx;
  823. float: left;
  824. height: 50rpx;
  825. padding-top: 30rpx;
  826. margin-right: 20rpx;
  827. .radio_icon {
  828. float: left;
  829. width: 40rpx;
  830. height: 40rpx;
  831. }
  832. }
  833. .contact_user {
  834. float: left;
  835. width: 640rpx;
  836. display: block;
  837. height: 50rpx;
  838. font-size: 24rpx;
  839. line-height: 50rpx;
  840. .contact_name {
  841. font-size: 26rpx;
  842. font-weight: bold;
  843. margin-right: 16rpx;
  844. }
  845. .contact_default {
  846. color: #F59A23;
  847. font-size: 20rpx;
  848. margin-left: 16rpx;
  849. border: 1rpx solid #F59A23;
  850. }
  851. .contact_shop {
  852. float: right;
  853. font-size: 26rpx;
  854. margin-right: 16rpx;
  855. }
  856. }
  857. .contact_addr {
  858. float: left;
  859. width: 640rpx;
  860. display: block;
  861. font-size: 24rpx;
  862. line-height: 30rpx;
  863. padding: 10rpx 5rpx;
  864. }
  865. }
  866. }
  867. .create_box {
  868. height: 140rpx;
  869. display: block;
  870. .create_addr {
  871. width: 700rpx;
  872. height: 80rpx;
  873. display: block;
  874. color: #FFFFFF;
  875. font-size: 30rpx;
  876. overflow: hidden;
  877. line-height: 80rpx;
  878. padding: 0rpx 0rpx;
  879. text-align: center;
  880. margin: 0rpx auto;
  881. margin-top: 20rpx;
  882. border-radius: 40rpx;
  883. background-color: #E03519;
  884. }
  885. }
  886. }
  887. </style>