<template>
  <div class="authorization-wrap">
    <div class="authorization-bar">
      温馨提示:您的系统{{ licenseType }}许可将于{{ expiresTimeStamp }}到期，请您联系相关人员续费！
    </div>
    <div class="closeClass" @click="closeEvent">
      <img src="~@/assets/20230223154621.png" alt="">
    </div>
  </div>
</template>

<script>
import moment from "moment/moment";

export default {
  name: "index",
  computed: {
    expiresTimeStamp() {
      const timeStamp = this.$store.state.app.expiresTimeStamp
      return this.$moment(+timeStamp).format('YYYY年MM月DD日')
    },
    licenseType() {
      const type = this.$store.state.app.licenseType
      return type ? (type == '1' ? '临时' : (type == '2' ? '正式' : '永久')) : '';
    }
  },
  methods: {
    closeEvent() {
      this.$emit('closeEvent')
    }
  }
  
}
</script>

<style scoped lang="less">
.authorization-wrap {
  position: fixed;
  top: 0;
  width: 100%;
  height: 50px;
  background: url(~@/assets/noAuthorized_bg.png) repeat-x;
  background-size: 100% 50px;
  z-index: 900;
  display: flex;
  justify-content: center;
  align-items: center;

  .authorization-bar {
    width: 680px;
    height: 50px;
    background: url(~@/assets/noAuthorized.png) no-repeat 0px 5px;
    background-size: 100% 45px;
    color: #fff;
    text-align: center;
    font-weight: bold;
    font-size: 18px;
    line-height: 45px;
    white-space: nowrap;
  }
}
.closeClass {
  float: right;
  margin-left: 40px;
}
</style>
