|
@@ -1,77 +0,0 @@
|
|
|
-<template>
|
|
|
|
|
- <div>
|
|
|
|
|
- <el-row>
|
|
|
|
|
- <el-col :md="18">
|
|
|
|
|
- <el-row v-if="status !== null" class="movie-list">
|
|
|
|
|
- <status-card :status="status" />
|
|
|
|
|
- </el-row>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- </el-row>
|
|
|
|
|
- </div>
|
|
|
|
|
-</template>
|
|
|
|
|
-
|
|
|
|
|
-<script>
|
|
|
|
|
-import StatusCard from '@/components/card/StatusCard'
|
|
|
|
|
-import { getAuthedUser } from '@/utils/auth'
|
|
|
|
|
-import { getUserStatus } from '@/api/status'
|
|
|
|
|
-
|
|
|
|
|
-export default {
|
|
|
|
|
- name: 'Status',
|
|
|
|
|
- components: { StatusCard },
|
|
|
|
|
- data() {
|
|
|
|
|
- return {
|
|
|
|
|
- // 屏幕宽度, 为了控制分页条的大小
|
|
|
|
|
- screenWidth: document.body.clientWidth,
|
|
|
|
|
- nextId: 0,
|
|
|
|
|
- status: null
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- created() {
|
|
|
|
|
- const path = this.$route.path
|
|
|
|
|
- const arr = path.split('/')
|
|
|
|
|
- const statusId = parseInt(arr[3])
|
|
|
|
|
-
|
|
|
|
|
- const userInfo = getAuthedUser()
|
|
|
|
|
- if (userInfo != null) {
|
|
|
|
|
- document.title = userInfo.screenName + '的状态'
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- getUserStatus(statusId).then(res => {
|
|
|
|
|
- if (res.code === 0) {
|
|
|
|
|
- this.status = res.data
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
- mounted() {
|
|
|
|
|
- // 当窗口宽度改变时获取屏幕宽度
|
|
|
|
|
- window.onresize = () => {
|
|
|
|
|
- return () => {
|
|
|
|
|
- window.screenWidth = document.body.clientWidth
|
|
|
|
|
- this.screenWidth = window.screenWidth
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- methods: {
|
|
|
|
|
- statusTimelineWrapper(nextId) {
|
|
|
|
|
- console.log('get timeline')
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-</script>
|
|
|
|
|
-
|
|
|
|
|
-<style scoped>
|
|
|
|
|
-.movie-list {
|
|
|
|
|
- padding-top: 15px;
|
|
|
|
|
- padding-left: 3%;
|
|
|
|
|
- padding-right: 3%;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-/*处于手机屏幕时*/
|
|
|
|
|
-@media screen and (max-width: 768px){
|
|
|
|
|
- .movie-list {
|
|
|
|
|
- padding-top: 8px;
|
|
|
|
|
- padding-left: 0.5%;
|
|
|
|
|
- padding-right: 0.5%;
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-</style>
|
|
|