<template>
  <div class="policy-detail">
    <div class="policy-detail-body">
      <status-desc :cardConfig="cardConfig"></status-desc>
      <pay-info :policy="policy"></pay-info>
      <ActBanner></ActBanner>
      <insurance-recommend class="Pdb-recommend" />
    </div>
  </div>
</template>
<script>
import ActBanner from "./modules/ActBanner";
import PayInfo from "./modules/PayInfo";
import StatusDesc from "../Detail/modules/StatusDesc";
import InsuranceRecommend from "../modules/InsuranceRecommend";
import { getGenPolicyDetail } from "@/api/policy";
import policyStatusMixin from "../mixin/policyStatus.mixin";
import routerMixin from "../mixin/router.mixin";

export default {
  name: "Sucess",
  mixins: [policyStatusMixin, routerMixin],
  components: {
    StatusDesc,
    PayInfo,
    ActBanner,
    InsuranceRecommend
  },
  data() {
    return {
      policy: {},
      cardConfig: {
        statusText: "购买成功"
      }
    };
  },
  async created() {
    const detail = await getGenPolicyDetail(this.$route.params.orderNo);
    this.policy = this.getGoodsInfo(detail);
  }
};
</script>
<style lang="less" src="../Detail/index.less" scoped></style>
