<template>
  <div class="logo-wrapper">
    <img @click="back" class="back" v-show="!isWeb && imgType == 1" src="~@/images/annual/back-1.png" alt="">
    <img @click="back" class="back" v-show="!isWeb && imgType == 2" src="~@/images/annual/back-2.png" alt="">
    <img class="logo" v-show="imgType == 1" src="~@/images/annual/logo-1.png" alt />
    <img class="logo" v-show="imgType == 2" src="~@/images/annual/logo-2.png" alt />
  </div>
</template>
<script>
import { mapGetters } from "vuex";
export default {
  props: {
    imgType: {
      type: Number | String,
      default: 1
    },
    backType: {
      type: Number | String,
      default: 1  // 1: H5返回; 2: 原生返回
    }
  },

  data() {
    return {
      isWeb: window.__isWeb,
    }
  },

  computed: {
    ...mapGetters(["backBDText"])
  },

  methods: {
    back() {
      if( this.backType == 1) {
        console.log('#####this.backType');
        this.$sendBuriedData({
          component_tag: `560#560001${this.backBDText}`
        });
        // setTimeout( () => {
        //   this.$router.back(-1);
        // }, 100);
      } else {
        this.$sendBuriedData({
          component_tag: '559#559001'
        });
        rocNative.goBack();
      }
    }
  },
};
</script>
<style lang="less" scoped>
.logo-wrapper {
  position: relative;
  top: 0;
  left: 0;
  z-index: 1;
  padding-bottom: 80px;
  .back {
    position: absolute;
    top: 35px;
    z-index: 2;
    left: 8px;
    width: 20px;
    height: 29px;
    padding: 0 4px;
    &.web {
      top: 15px;
    }
  }
  .logo {
    position: absolute;
    top: 30px;
    right: 30px;
    z-index: 2;
    display: block;
    width: 77px;
    height: 50px;
    &.web {
      top: 10px;
    }
  }
}
</style>