<template>
  <sail-page type="loading-view" title="系统消息" isHead>
    <div slot="content">
       <emptyPageCard :isEmptyType="systemList.length===0?'message':'normal'"/>
        <div class="copyright">
        	<div class="copyright__theme">
        		<h1 class="copyright__theme_header" v-if="systemList.length!==0">{{systemTime | accurateTime}}</h1>
        		<div class="copyright__theme_text">
        			<version v-for="(item, index) in systemList" :key="index" :data="item"/>
        		</div>
        	</div>
        </div>
    </div>
  </sail-page>
</template>

<script>

import sailPage from "@/components/sail-page.vue";
import version from "@/common/widget/version.vue";
import { mapState } from "vuex";
import emptyPageCard from "@/common/widget/emptyPageCard.vue";
export default {
  components: {
    sailPage,
    version,
    emptyPageCard
  },
  computed: {
    ...mapState({
      systemList: state => state.messageModule.systemList,
    }),
    systemTime() {
      if(this.systemList.length === 0) {
        return Date.now();
      }
      return this.systemList[0].createTime;
        
    }
  },
  asyncData({store, route}) {
    //let id = route.params.id
    return store.dispatch("messageModule/findAllOnCAPP").then(res => {
         
    });
  },
  data: function(){
    return {
        
    }; 
  },
  methods: {
      
  }
};
</script>
<style lang="less">
  
</style>
<style lang="less" scoped>
  .copyright {
  	.copyright__theme {
		width: 340px;
		margin: 0 auto;
		font-size: 14px;
		.copyright__theme_header {
			margin-top: 10px;
			margin-bottom: 10px;
		}
    .copyright__theme_text {
    }
  	}
  }
</style>