<template>
  <div class="moments">
    <div class="title">
      <p>资讯</p>
    </div>
    <moment-item />
  </div>
</template>

<script>
import { findByUserId } from "@/api/infomation";
import MomentItem from "./components/momentItem.vue";

export default {
  name: "Moments",
  components: { MomentItem },
  created() {
    this.getMoment();
  },
  methods: {
    getMoment() {
      const params = {
        userId: this.$userId
      };
      findByUserId(params).then(res => {
        console.log(res);
      });
    }
  }
};
</script>

<style lang="scss" scoped>
.moments {
  box-sizing: border-box;
  p {
    margin: 0;
    padding: 0;
  }
}
.title {
  height: 46px;
  line-height: 46px;
  margin-bottom: 5px;
  text-align: center;
  font-family: PingFang-SC-Bold;
  font-size: 20px;
  font-weight: bold;
  background-color: #ffffff;
}
</style>
