order.vue 26 KB

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