order.vue 23 KB

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