<template>
  <div style="height:100%">
    <preview :banner="banner" style="height:100%;z-index:100;"></preview>
  </div>
</template>

<script>
import preview from '@/components/preview/preview.vue'
import { createNamespacedHelpers } from 'vuex'
const { mapState: mapMakingState, mapActions: mapMakingActions } = createNamespacedHelpers('making')
export default {
  data(){
    return{
      banner:[]
    }
  },
  components: {
    preview
  },
  computed: {
    ...mapMakingState({
      bannerBlack: item => item.bannerBlack,
      bannerRed: item => item.bannerRed
    })
  },
  created () {
    if (this.$route.query.type == 1) {
      this.banner = this.bannerBlack
    } else {
      this.banner = this.bannerRed
    }
  }
}
</script>

<style lang="scss" scoped>
</style>
