<template>
  <message></message>
</template>
<script>
  import { Message } from '~components/mobile/center'
  export default {
    middleware: 'authenticated',
    layout: 'mobileNoHeader',
//    fetch ({ store }) {
//      let user = store.state.option.user.data
//      return Promise.all([
//        // 获取消息列表
//        store.dispatch('messageShow/getAllMessage', { receiverUu: user.userUU, receiverEnuu: user.enterprise.uu, consumerApp: 'MALL', count: 10, page: 1, sorting: {'createTime': 'DESC'} })
//      ])
//    },
    created () {
      let user = this.user.data
      this.$store.dispatch('messageShow/getAllMessage', { receiverUu: user.userUU, receiverEnuu: user.enterprise.uu, consumerApp: 'MALL', count: 10, page: 1, sorting: {'createTime': 'DESC'} })
    },
    components: {
      Message
    }
  }
</script>

