<template>
  <sail-page type="subscribeList" title="我的预约" isHead>
    <div slot="content">
       <emptyPageCard :isEmptyType="subscribeList.length===0?'subscripbe':'normal'"/>
        <div class="subscribe-list-wrapper" v-if="subscribeList.length!==0">
            <StatusCard v-for="(item, index) in subscribeList" :key="index" :targetUrl="`/subscribeDetail/${item.id}`" :code="item.orderNo" iconType="subscribe">
              <div slot="content">
                 <p>预约时间：{{item.seeTime|normalDate}} {{timeMap[item.seeTimeInterval]}} </p>
                 <p>预约项目：{{item.Region}}</p>
                 <p>看房地址：{{item.address}}</p>
              </div>
             <!-- <span slot="footer">费用：<span class="status-fee">200</span></span> -->
            </StatusCard>
        </div>
    </div>
  </sail-page>
</template>

<script>

import sailPage from "@/components/sail-page.vue";
import StatusCard from "@/common/widget/statusCard";
import { mapState } from "vuex";
import emptyPageCard from "@/common/widget/emptyPageCard.vue";
export default {
  components: {
    sailPage,
    StatusCard,
    emptyPageCard
  },
  computed: {
    ...mapState({
      subscribeList: state => state.subscribeModule.subscribeList,
    }),

  },
  mounted(){
    setTimeout(()=>{
      
    },500);
      
  },
  asyncData({store, route}) {
    //let name = route.params.name
    return store.dispatch("subscribeModule/subscribeList").then(res => {
         
    });
  },
  data: function(){
    return {
      timeMap: {
        1: "上午",
        2: "下午",
        3: "晚上"
      }
    };
  },
  methods: {
      
  }
};
</script>
<style lang="less">
  
</style>
<style lang="less" scoped>
    @nice-gray: #585858;
    .subscribe-list-wrapper {
      margin-top: 12px;
      height: 90vh;
      overflow: scroll;
      .subscribe-user {
        color: @nice-gray;
        font-weight: bold;
      }
    }
</style>1