<template>
  <div class="sucess">
    <div class="p_content">
      <div class="top">
        <div class="p_title">恭喜你！成功报名</div>
        <div>
          <img src="@/assets/img/signUp/offer.png" alt="" />
        </div>

        <div class="btn">
          <el-button @click="handleDownload">下载入营通知书</el-button>
        </div>
      </div>

      <div class="lips">
        <div>提醒事项：</div>
        <div>报名成功后，请及时下载入营通知书，以便提前做好入营准备。</div>
      </div>
    </div>
  </div>
</template>

<script>
/* eslint-disable */
import { signUpInit } from "r/index/signUp";

export default {
  name: "Sucess",

  data() {
    return {};
  },
  created() {},
  methods: {
    handleDownload() {
      signUpInit({}).then((res) => {
        if (res.data.code != 200) {
          return this.$message.error(res.data.message);
        }
        if (res.data.is_dowload == 1) {
          window.location.href = res.data.dowload_url;
        } else {
          return this.$message.error("营地下载证书还未开始");
        }
      });
    },
  },
};
</script>

<style  lang="scss" scoped>
@import "a/scss/btn";
.btn {
  padding-bottom: 0 !important;
}
.sucess {
  padding: 0 56px 65px 56px;
  .p_content {
    .top {
      .p_title {
        font-size: 18px;
        font-weight: 500;
        color: #12141c;
        line-height: 18px;
        margin: 10px 0 30px 0;
      }
      div {
        text-align: center;
        font-size: 16px;
        font-weight: 500;
        color: #666666;
        line-height: 18px;
      }
    }
  }
  //  注意事项
  .lips {
    margin-top: 20px;
    div {
      font-size: 12px;
      font-weight: 500;
      color: #999999;
      line-height: 21px;
    }
  }
}
</style>
