<template>
  <div>
    <div class="header">
      <backIcon class="back"></backIcon>
      <!-- 活动中心 -->
      {{ tab == 1 ? $t('tab.tab6') : $t('my.l22') }}
      <div class="icon-box" v-if="tab == 1" @click="$router.push('/pre-activities/2')">
        <!-- 往期活动 -->
        {{ $t('my.l22') }}
      </div>
    </div>
    <iframe v-if="appParams.activity" class="iframe" :src="`${appParams.activity}?tab=${this.tab}&language=${language}`" frameborder="0"></iframe>
  </div>
</template>
<script>
import backBar from '@/components/backBar'
export default {
  components: {
    backBar
  },
  data () {
    return {
      tab: '1'
    }
  },
}
</script>
<style lang="less" scoped>
.header {
  padding-top: 15px;
  padding-bottom: 17px;
  text-align: center;
  font-size: 18px;
  color: #000000;
  position: relative;
  .back {
    position: absolute;
    left: 9px;
    top: 11px;
  }
  .icon-box {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 15px;
    color: #0F6EFF;
    font-size: 16px;
    font-weight: 400;
    max-width: 100px;
  }
}
.iframe {
  position: fixed;
  top: 50px;
  left: 0;
  bottom: 0;
  right: 0;
  width: 100%;
  height: calc(100% - 50px);
}
</style>