<template>
  <div class="assets-record-detail-con bg-grey">
    <div class="detail-con">
      <p class="name">{{ data.title }}</p>
      <p class="num">{{ data.num }}</p>
      <p class="status">{{ data.status }}</p>
      <div class="info-con">
        <div
          class="info-item"
          v-for="(item, index) of data.infoList"
          :key="`info-item-${index}`"
        >
          <div class="label">{{ item.label }}</div>
          <div
            class="val"
            :class="{ 'hash-link': item.hash && !!item.val }"
            @click="handleClick(item)"
          >
            {{ item.val || "--" }}
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      data: {
        infoList: [],
      },
    };
  },
  methods: {
    handleClick(item) {
      // if (item.hash && item.val) {
      //   this.goChainExploreTxDetail(item.val);
      // }
    },
  },
  mounted() {
    this.data = this.$route.query;
  },
};
</script>

<style lang="less">
.assets-record-detail-con {
  padding: 0 16px;
  > .detail-con {
    margin-top: 50px;
    padding: 30px 20px;
    background: #ffffff;
    border-radius: 6px;
    > .name {
      text-align: center;
      font-weight: bold;
      font-size: 14px;
      margin-bottom: 15px;
    }
    > .num {
      text-align: center;
      font-size: 30px;
      margin-bottom: 12px;
      font-family: DINAlternate-Bold;
    }
    > .status {
      text-align: center;
      color: #999999;
      font-size: 14px;
      margin-bottom: 20px;
    }
    > .info-con {
      padding-top: 20px;
      border-top: 1px solid #f1f1f1;
      .info-item {
        display: flex;
        align-items: flex-start;
        margin-bottom: 12px;
      }
      .info-item .label {
        width: 70px;
        margin-right: 20px;
        color: #666666;
        font-size: 14px;
      }
      .info-item .val {
        flex: 1;
        word-break: break-all;
        font-size: 14px;
        // &.hash-link {
        //   color: #4a9bf7;
        // }
      }
    }
  }
}
</style>