Commit d98d78d7 authored by Xuguangxing's avatar Xuguangxing

feat: 对接确认订单页完毕

parent 304b129e
<template>
<div>
<div class="goods-bottom-container">
<div v-if="showGroupDesc" class="group-desc">
<cr-image width="14px" src="@/assets/images/groupIcon.png" />
<span class="red-text">[正在拼团]</span>
<span class="normal-text">拼团成功即可退款0元拿,拼团失败立即退款</span>
</div>
<div v-if="type === 'shoppingCar'" class="goods-bottom">
<div class="goods-bottom-icon" @click="goHome">
<span class="iconfont icon-home" />
......@@ -30,6 +35,10 @@
export default {
name: 'BottomNav',
props: {
showGroupDesc: {
type: Boolean,
default: true
},
type: {
type: String,
default: 'shopCar' // shoppingCar 购物车;settlement 结算;submitOrder 确认订单
......@@ -66,10 +75,29 @@ export default {
};
</script>
<style lang="less" scoped>
.goods-bottom {
.goods-bottom-container {
position: fixed;
left: 0;
bottom: 0;
width: 100%;
.group-desc {
display: flex;
align-items: center;
width: 100%;
height: 30px;
background: @white;
padding: 0 @padding-xs;
.text-12();
.red-text {
margin: 0 @padding-unit;
color: @red;
}
.normal-text {
color: @black;
}
}
}
.goods-bottom {
display: flex;
justify-content: space-evenly;
align-items: center;
......@@ -77,7 +105,7 @@ export default {
height: 30px;
padding: 10px 0;
background: @white;
border-top: 2px solid #f7f7f7;
border-top: 1px solid #f7f7f7;
&-radio {
display: flex;
align-items: center;
......
......@@ -10,7 +10,7 @@
<span>¥{{ calcFeeInfo.totalFreightFee || '0.00' }}</span>
</div>
</div>
<div class="coupon">
<div v-if="showCoupon" class="coupon">
<div
v-for="(item, idx) in couponActivityInfoList"
:key="idx"
......@@ -55,6 +55,11 @@ import { DISCOUNT, FREIGHT, CASH, REDUCTION, HAS_DISCOUNT, TITLE_LIST } from '@/
export default {
name: 'CouponInfo',
props: {
showCoupon: {
// 团购订单隐藏优惠信息
type: Boolean,
default: false
},
couponActivityInfoList: {
type: Array,
default: () => []
......@@ -90,7 +95,12 @@ export default {
.mg-bottom-20 {
margin-bottom: @padding-lg;
}
.goods,
.goods {
background: @white;
padding: 0 @padding-xs;
border-radius: @border-radius-md;
margin-bottom: @padding-sm;
}
.coupon {
background: @white;
padding: @padding-sm @padding-xs;
......@@ -102,6 +112,8 @@ export default {
display: flex;
justify-content: flex-end;
align-items: center;
line-height: 36px;
height: 36px;
span {
.text-13();
&:first-child {
......
......@@ -135,6 +135,7 @@ export default {
},
// 选择完地址后触发更新
handleAddressChange(e) {
console.log(e);
if (e.noAddr) {
this.$set(this.orderData, 'addrReceiverId', '');
this.getConfirmOrderInfo();
......@@ -232,6 +233,88 @@ export default {
// 获取确认订单信息
async getConfirmOrderInfo() {
const [data] = await order.confirmOrder(this.orderData);
// const data = {
// addrReceiverInfo: {
// addrReceiverId: 682,
// receiverName: 'ndjnn',
// addrFullName: '北京,石景山区,八角街道,nsnn',
// receiverPhoneNo: '18511117191'
// },
// invalidSkuList: [
// {
// skuName: '[自营]Apple AirPods Pro 主动降噪无线蓝牙耳机 适用iPhone/iPad/Apple Watch',
// tagList: [],
// skuImg:
// 'http://img30.360buyimg.com/sku/jfs/t1/59411/33/15646/64951/5dd50baaE81702116/413160a74742f504.jpg',
// marketPrice: '1760.66',
// skuSource: 1,
// invalidStatus: 0,
// salePrice: '1599',
// count: 1,
// canAdd: true,
// invalidStatusDesc: '该地址暂无库存',
// skuId: 3732897275393,
// jumpUrl: 'xyqb://homepage/goodsdetail?skuNo=3732897275393'
// }
// ],
// shopSkuList: [
// {
// freightFee: '12.00运费',
// shopInfo: {
// shopId: 12,
// shopName: '店铺名称',
// shopImg: 'https://'
// },
// skuList: [
// {
// marketPrice: '35.60',
// invalidStatus: 0,
// salePrice: '34.4',
// count: 1,
// canAdd: true,
// invalidStatusDesc: '宝贝已失效,不能购买',
// jumpUrl: 'xyqb://homepage/goodsdetail?skuNo=7331961',
// skuName:
// '[别下单-开普勒]美加净 MAXAM 细嫩柔白隔离防晒乳100mlSPF30 PA+++ (面部身体户外鲜果防晒霜男女)',
// tagList: [],
// skuImg:
// 'http://img11.360buyimg.com/n1/jfs/t21367/129/509809607/84163/17b4ed2e/5b0f8bdfNba3c4b43.jpg',
// skuSource: 2,
// skuAttr: '【防晒】细嫩柔白100ml',
// skuId: 7331961,
// goodsTypeImage: 'https://kdspstatic.q-gp.com/kdsp/goods/icon/best-selected3x.png'
// }
// ]
// }
// ],
// calcFeeInfo: {
// couponFee: '0.00',
// totalFreightFee: '10.00',
// totalPayFee: '10.00',
// couponFreightFee: '0.00',
// totalSkuFee: '10.00'
// },
// hasNext: false,
// couponActivityInfoList: [
// {
// hasCouponActivity: 1,
// couponActivityType: 4
// },
// {
// hasCouponActivity: 1,
// couponActivityType: 3
// },
// {
// hasCouponActivity: 1,
// couponActivityType: 2
// },
// {
// hasCouponActivity: 1,
// couponActivityType: 1
// }
// ]
// };
if (data) {
const {
addrReceiverInfo,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment