<!-- 求购信息详情 -->
<template>
  <div class="bg-F5">
    <div class="container">
      <div class="leftLine"></div>
      <div class="title">
        <span class="type">{{ $t("page.views.info.buy.purchaseTitle") }}</span>
        <span class="name">{{ demandInfo.purchaseTitle }}</span>
      </div>
      <div class="xqDiv mt5rem">
        <div class="tit">{{ $t("page.views.info.buy.summaryOfNeeds") }}：</div>
        <div class="con">{{ demandInfo.summaryOfNeeds }}</div>
      </div>
      <div class="xqDiv">
        <div class="tit">{{ $t("page.views.info.buy.demandDetails") }}：</div>
        <div class="con">
          {{ demandInfo.demandDetails }}
        </div>
      </div>
      <div class="xqDiv">
        <div class="tit">{{ $t("page.views.info.buy.contacts") }}：</div>
        <div class="con">{{ demandInfo.contacts }}</div>
      </div>
      <div class="xqDiv">
        <div class="tit">{{ $t("page.views.info.buy.contactNumber") }}：</div>
        <div class="con">{{ demandInfo.contactNumber }}</div>
      </div>
      <div class="xqDiv">
        <div class="tit">{{ $t("page.views.info.buy.releaseTime") }}：</div>
        <div class="con">{{ demandInfo.releaseTime }}</div>
      </div>
    </div>
  </div>
</template>
<script lang="ts">
import { Component, Vue, Watch, Prop } from "vue-property-decorator";
@Component
export default class extends Vue {
  private demandInfo = {};
  @Prop(String) private id!: number;
  @Watch("id", { immediate: true })
  async load(id: string) {
    const [err, { demandInfo }] = await this.$post<{ demandInfo: IAny }>(
      "/demand/info/getDemandInfo",
      { id }
    );
    this.demandInfo = demandInfo;
  }
}
</script>
<style lang="scss" scoped>
.container {
  background: #fff;
  margin-top: 2rem;
  margin-bottom: 4rem;
  padding: 3rem 4rem 2rem 4rem;
  position: relative;
  box-sizing: border-box;
  border-radius: 0.4rem;
  .leftLine {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 1rem;
    border-radius: 0.5rem;
    background: #fccabb;
  }
  .title {
    height: 4rem;
    line-height: 4rem;
    text-align: center;
    .type {
      display: inline-block;
      height: 2.2rem;
      line-height: 2.2rem;
      font-size: 1.4rem;
      color: #fff;
      border-radius: 0.4rem;
      padding: 0 0.6rem;
      background: #fd5522;
    }
    .name {
      font-size: 1.8rem;
      color: #333;
      margin-left: 1.6rem;
    }
  }
  .xqDiv {
    line-height: 2.4rem;
    overflow: hidden;
    font-size: 1.4rem;
    .tit {
      color: #333;
      width: 18%;
      float: left;
      text-align: right;
    }
    .con {
      color: #666;
      width: 80%;
      float: left;
    }
  }
}
.mt5rem {
  margin-top: 5rem;
}
</style>
