<template>
  <el-tabs v-model="activeName">
    <el-tab-pane label="退券记录" name="refund-list">
      <refundList />
    </el-tab-pane>
    <el-tab-pane label="卡券积分回收明细" name="recycle-record-detail" v-if="isAolaiVal">
      <recycleRecordDetail />
    </el-tab-pane>
  </el-tabs>
</template>

<script>
import refundList from './refund-list.vue';
import { isAolai } from '@/service/api/cardApi.js';
import recycleRecordDetail from './recycle-record-detail.vue';
export default {
  data() {
    return {
      activeName: 'refund-list',
      isAolaiVal: false
    };
  },
  components: {
    refundList,
    recycleRecordDetail
  },
  mounted() {
    this.isAolai();
  },
  methods: {
    async isAolai() {
      const res = await isAolai();
      this.isAolaiVal = res.result;
    }
  }
};
</script>

<style></style>
