confirm.vue 1.9 KB
<template>
  <LayoutApp :show-back="true">
    <div class="body">
      <TitleComp txt="出售"></TitleComp>
      <ProductInfo class="product-info"></ProductInfo>
      <InputPrice class="input-price"></InputPrice>
      <OrderMargin class="order-item order-margin"></OrderMargin>
      <OrderFee class="order-item"></OrderFee>
      <AddressInfo class="order-item"></AddressInfo>
      <OrderAgree v-model="agree" class="order-item"></OrderAgree>
    </div>
    <ConfirmButton :txt="txt" class="footer"></ConfirmButton>
  </LayoutApp>
</template>

<script>

import ProductInfo from './components/confirm/product';
import InputPrice from './components/confirm/input-price';
import AddressInfo from './components/confirm/address';
import ConfirmButton from './components/confirm/button';
import TitleComp from './components/confirm/title';
import OrderMargin from './components/confirm/order-margin';
import OrderFee from './components/confirm/order-fee';
import OrderAgree from './components/confirm/agree';

import { createNamespacedHelpers } from 'vuex';
const { mapState, mapActions, mapMutations } = createNamespacedHelpers('order/orderConfirm');

export default {
  name: 'OrderConfirm',
  props: {
    orderCode: {
      type: String,
      default: ''
    }
  },
  components: {
    ProductInfo,
    AddressInfo,
    ConfirmButton,
    InputPrice,
    TitleComp,
    OrderMargin,
    OrderFee,
    OrderAgree
  },
  data() {
    return {
      txt: '提交',
      agree: false
    };
  },
  mounted() {
    this.fetchOrderDetail({orderCode: this.orderCode})
  },
  methods: {
    ...mapActions(['fetchOrderDetail'])
  }
};
</script>

<style lang="scss" scoped>
.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  z-index: 100;
}

.body {
  height: 100%;
  margin: 0 40px;
  overflow-y: auto;
}

.order-item {
  padding-top: 40px;
  padding-bottom: 40px;
}

.order-item + .order-item {
  border-top: 1px solid #eee;
}

</style>