1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<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: JSON.parse(localStorage.getItem("user")).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>