<template>
  <div class="flex justify-center page">
    <div class="page-content flex flex-col items-center">
      <div class="icon-submit-succsss"></div>
      <div class="tip mt-4 mb-6">提交成功</div>
      <div class="label text-center">
        审核通过后，用户可通过正品授权入口或扫二维码查看 机构及设备正品授权信息
      </div>
      <div class="record-btn mt-4" @click="toClubRecord">认证记录</div>
    </div>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'
export default {
  layout: 'app-normal',
  computed: {
    ...mapGetters(['supplierInfo', 'authUserId', 'routePrefix', 'accessToken']),
  },
  methods: {
    toClubRecord() {
      if (this.accessToken) {
        this.$router.push(`${this.routePrefix}/record/club/detail`)
      } else {
        this.$toast('请登录后查看')
        this.$router.push(this.routePrefix)
      }
    },
  },
}
</script>

<style lang="scss" scoped>
@media screen and (min-width: 768px) {
  .page {
    min-height: calc(100vh - 80px - 80px);
    background: #fff;
  }
  .page-content {
    width: 432px;
    padding-top: 140px;

    .icon-submit-succsss {
      width: 64px;
      height: 64px;
      background: url(~assets/theme-images/common/pc-icon-submit-success.png)
        no-repeat center;
      background-size: 64px;
    }

    .tip {
      font-size: 24px;
      font-weight: bold;
      color: #1890ff;
    }
    .label {
      font-size: 18px;
      color: #282828;
      line-height: 1.6;
    }
    .record-btn {
      width: 98px;
      height: 36px;
      color: #fff;
      font-size: 14px;
      text-align: center;
      line-height: 36px;
      border-radius: 4px;
      cursor: pointer;
      background: #bc1724;
    }
  }
}

@media screen and (max-width: 768px) {
  .page-content {
    padding: 0 9.2vw;
    padding-top: 25.2vw;

    .icon-submit-succsss {
      width: 12vw;
      height: 12vw;
      background: url(~assets/theme-images/common/h5-icon-submit-success.png)
        no-repeat center;
      background-size: 12vw;
    }

    .tip {
      font-size: 4.2vw;
      font-weight: bold;
      color: #1890ff;
    }
    .label {
      font-size: 3.4vw;
      color: #282828;
      line-height: 1.6;
    }
    .record-btn {
      width: 36vw;
      height: 8.8vw;
      color: #fff;
      font-size: 3.2vw;
      text-align: center;
      line-height: 8.8vw;
      border-radius: 0.4vw;
      cursor: pointer;
      background: #bc1724;
    }
  }
}
</style>
