<template> <div class="white_bg burt-container"> <!--详细信息--> <companyInfo :detailObj="detailObj" /> <!--折扣信息--> <Discount v-if="detailObj.id" :detailObj="detailObj" @getDetail="getDetail" /> </div> </template> <script> import companyInfo from "./components/companyInfo"; import Discount from "./components/companyDiscount"; export default { data(){ return { id: '', //公司id detailObj: { //公司详情 discountList: [], //折扣列表 } } }, components: { companyInfo, Discount }, created(){ this.id = this.$route.query.id; this.getDetail(); }, methods: { //获取详细信息 getDetail() { this.$apis.PAYORDETAIL({ id: this.id, }) .then((res) => { if (res.returnCode == "0000") { this.detailObj = res.content || {}; } else { this.$message.error(res.returnMsg); } }); }, } } </script> <style lang="less" scoped> </style>