
<template>
  <sail-page type="userApplyList" title="我的申请">
    <div slot="content">
      <van-nav-bar
        title="我的申请"
        left-arrow
        @click-left="back"
      />
       <emptyPageCard :isEmptyType="applyList.length===0?'applyreport':'normal'"/>
        <div class="apply-list-wrapper">
            <StatusCard :targetUrl="`/applyDetail/${item.id}`" :code="item.applyCode" :statusDesc="statusMap[item.status]" iconType="apply" v-for="(item, index) in applyList" :key="index">
              <div slot="content">
                 <p class="apply-user">申请人：{{item.applicantName}} </p>
                 <p>联系电话：{{item.applicantPhone}} </p>
                 <p>申请时间：{{item.applyTime|chinaDate}}</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 {
  computed: {
    ...mapState({
      applyList: state => state.applyModule.applyList
    })
  },
  components: {
    sailPage,
    StatusCard,
    emptyPageCard
  },
  asyncData({store, route}) {
    return store.dispatch("applyModule/applyLiveList").then(res => {
         
    });
  },
  data: function(){
    return {
      statusMap: {
        1: "待核验",
        2: "待选房",
        3:"待核验",
        4: "待核验",
        5: "待办理",
        6: "入住成功",
        7: "办理失效",
        8: "撤销申请",
        9: "审核不通过",
        10: "待支付",
        11: "待缴费",
        12: "支付失效",
        13: "待退款",
        14: "已退款",
        15: "入住办理中",
        16: "待备案",
        17: "备案不通过"
      }
    }; 
  },
  methods: {
    back() {
      this.$router.push({path:"/MyPage"});
      //this.$router.back()
    },
  }
};
</script>
<style lang="less">
  
</style>
<style lang="less" scoped>
    @nice-gray: #585858;
    .apply-list-wrapper {
      margin-top: 12px;
      .apply-user {
        color: @nice-gray;
        font-weight: bold;
      }
    }
</style>1