<template>
   <div>
        <!-- 单个活动列表详情 -->
                    <div class="scroll" style="padding:15px 4%;">
                         <div class="activityImages">
                            <img :src="activitys.poster_photo" style="width:100%;height:100%">
                         </div>
                         <div class="activitycontent">
                            活动标题:{{activitys.title}}
                         </div>
                          <div class="activitycontent">
                            活动副标题:{{activitys.subtitle}}
                         </div>
                          <div class="activitycontent">
                            活动详细地址:{{activitys.address}}
                         </div>
                          <div class="activitycontent">
                            开始时间:开始时间: {{staffCreateTime(activitys.start_time)}}
                         </div>
                          <div class="activitycontent">
                            结束时间:{{staffCreateTime(activitys.end_time)}}
                         </div>
                          <div class="activitycontent">
                            报名须知:{{activitys.sign_up_notice}}
                         </div>
                          <div class="activitycontent">
                            联系方式:{{activitys.phone_number}}
                         </div>
                          <div class="activitycontent">
                            限制人数:{{activitys.limit_num}}
                         </div>
                          <div class="activitycontent">
                            已报名人数:{{activitys.join_num}}
                         </div>
                    </div>
   </div>
</template>

<script>
    import {uParseTime} from "@/utils/tools";
    import { singleActivitInfo } from "@/api/micro/micro"
    export default {
        name: "activitylistdetail",
        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 scoped>

</style>
