<template>
  <div>
    <div class="banner">
      <img :src="activitys.poster_photo" style="width:100%;height:100%" alt />
    </div>
    <div class="headline">
      <div class="top">{{activitys.title}}</div>
      <!-- <div class="bottom">
        <p class="browse">
          <i class="iconfont">&#xe629;</i>
          <span>浏览400次</span>
        </p>
      </div> -->
    </div>
    <div class="detail">
      <p class="row">
        <i class="iconfont">&#xe608;</i>
        <span>{{staffCreateTime(activitys.start_time)}}</span>
      </p>
      <p class="row">
        <i class="iconfont">&#xe608;</i>
        <span>{{activitys.address}}</span>
      </p>
      <p class="row">
        <i class="iconfont">&#xe608;</i>
        <span>{{activitys.join_num}} / {{activitys.limit_num}}</span>
      </p>
      <p class="row">
        <i class="iconfont">&#xe608;</i>
        <span>{{activitys.phone_number}}</span>
      </p>
    </div>
    <div class="introduce">
      <div class="common_title">
        <div class="one"></div>
        <div class="dynamicTxt">报名须知</div>
      </div>
      <div
        class="introduceDetail"
      >{{activitys.sign_up_notice}}</div>
    </div>
    <!-- <div class="apply">我要报名</div> -->
  </div>
</template>
 <script>
        import {uParseTime} from "@/utils/tools";
        import { singleActivitInfo } from "@/api/micro/micro"
        export default{
          data(){
             return{
                activitys:[],
             }
          },
          methods:{
              staffCreateTime(time) {
                console.log("time是多少",time)
               return uParseTime(time, "{y}-{m}-{d} {h}:{i}:{s}");       
              },
            singleActivitInfo(id,orgid){
               singleActivitInfo(id,orgid).then(response=>{
                  if(response.data.state ==1){
                  var activitys = response.data.data.activity;
                  this.activitys = activitys;
                  console.log("activitys",activitys)
                }   
               })
            }
          },
          created(){
            const id = this.$route.query.id;
            const orgid = this.$route.query.orgid;
            console.log("id是多少",id)
            console.log("orgid是多少",orgid)
            this.singleActivitInfo(id,orgid)   
          }
        }
 </script>

<style lang="scss" scoped>
.banner {
  width: 100%;
  height: 13.75rem;
  img {
    width: 100%;
    height: 100%;
  }
}
.headline {
  position: fixed;
  width: 20.875rem;
  height: 6.5625rem;
  margin-top: -1.25rem;
  left: 1.25rem;
  z-index: 99;
  background: rgba(255, 255, 255, 1);
  box-shadow: 0px 6px 20px 0px rgba(0, 0, 0, 0.05);
  border-radius: 10px;
  padding: 1.0625rem 0.625rem 0 0.875rem;
  box-sizing: border-box;
  .top {
    font-size: 1.0625rem;
    font-weight: 600;
    color: rgba(7, 18, 40, 1);
    line-height: 1.5rem;
  }
}
.browse {
  color: rgba(182, 186, 193, 1);
  margin-top: 0.5rem;
  span {
    font-size: 0.75rem;
    font-weight: 400;
  }
}
.detail {
  margin-left: 1.25rem;
  margin-top: 5.625rem;
  .row {
    margin: 0.625rem 0;
    i {
      color: #b6bac1;
    }
    span {
      font-size: 0.875rem;
      font-weight: 600;
      color: rgba(7, 18, 40, 1);
      margin-left: 0.625rem;
    }
  }
}
.introduce {
  margin-left: 1.25rem;
  margin-top: 1.5rem;
}

.common_title {
  width: 20.9375rem;
  height: 1.125rem;
  line-height: 1.125rem;
  font-size: 1.125rem;
  font-weight: 800;
  color: rgba(7, 18, 40, 1);
}

.one {
  margin-top: 0.125rem;
  margin-right: 0.625rem;
  float: left;
  width: 0.125rem;
  height: 0.875rem;
  background: linear-gradient(
    0deg,
    rgba(114, 182, 253, 1),
    rgba(52, 119, 254, 1)
  );
  box-shadow: 0px 3px 12px 0px rgba(60, 127, 254, 0.2);
  border-radius: 3px;
}
.introduceDetail {
  width: 19.875rem;
  height: 5.75rem;
  font-size: 1rem;
  color: rgba(155, 155, 155, 1);
  line-height: 1.5rem;
  margin-top: 1.125rem;
  padding-left: 0.375rem;
  box-sizing: border-box;
}
.apply {
  width: 100%;
  height: 2.625rem;
  position: fixed;
  left: 0;
  bottom: 0;
  text-align: center;
  line-height: 2.625rem;
  color: rgba(255, 255, 255, 1);
  font-size: 1.125rem;
  background: linear-gradient(
    90deg,
    rgba(114, 182, 253, 1),
    rgba(52, 119, 254, 1)
  );
}
</style>
