|
|
@@ -1,33 +1,9 @@
|
|
|
<template>
|
|
|
<v-container class="grey lighten-5">
|
|
|
<v-row justify="space-between">
|
|
|
- <v-col md="4">
|
|
|
- <v-card
|
|
|
- class="mx-auto"
|
|
|
- color="#26c6da"
|
|
|
- dark
|
|
|
- max-width="400"
|
|
|
- >
|
|
|
- <v-card-title>
|
|
|
- <v-icon
|
|
|
- small
|
|
|
- left
|
|
|
- >
|
|
|
- mdi-twitter
|
|
|
- </v-icon>
|
|
|
- <span class="text-h6 font-weight-light">用户名</span>
|
|
|
- </v-card-title>
|
|
|
- <v-card-text class="text-h5 font-weight-light">
|
|
|
- 用户签名
|
|
|
- </v-card-text>
|
|
|
- <v-card-text class="text-h5 font-weight-light">
|
|
|
- 关注 | 被关注
|
|
|
- </v-card-text>
|
|
|
- </v-card>
|
|
|
- </v-col>
|
|
|
- <v-col md="4">
|
|
|
+ <v-col>
|
|
|
<v-row dense>
|
|
|
- <v-col cols="12">
|
|
|
+ <v-col>
|
|
|
<v-card
|
|
|
color="#385F73"
|
|
|
dark
|
|
|
@@ -39,7 +15,7 @@
|
|
|
falt
|
|
|
filled
|
|
|
auto-grow
|
|
|
- label="想和大家分享点什么呢?"
|
|
|
+ label="说点什么呢?"
|
|
|
rows="3"
|
|
|
/>
|
|
|
</v-row>
|
|
|
@@ -60,7 +36,7 @@
|
|
|
</v-row>
|
|
|
</v-card>
|
|
|
</v-col>
|
|
|
- <v-col cols="12">
|
|
|
+ <v-col>
|
|
|
<v-sheet
|
|
|
class="mx-auto"
|
|
|
max-width="700"
|
|
|
@@ -109,7 +85,6 @@
|
|
|
<v-col
|
|
|
v-for="item in list"
|
|
|
:key="item.statusId"
|
|
|
- cols="12"
|
|
|
>
|
|
|
<status-card :item="item" />
|
|
|
</v-col>
|
|
|
@@ -117,6 +92,30 @@
|
|
|
</v-col>
|
|
|
<v-col md="4">
|
|
|
<v-row dense>
|
|
|
+ <v-col cols="12">
|
|
|
+ <v-card
|
|
|
+ class="mx-auto"
|
|
|
+ color="#26c6da"
|
|
|
+ dark
|
|
|
+ >
|
|
|
+ <v-card-title>
|
|
|
+ <v-avatar size="32">
|
|
|
+ <v-img
|
|
|
+ :src="this.$store.state.user.userInfo.avatarUrl"
|
|
|
+ :alt="this.$store.state.user.userInfo.username"
|
|
|
+ :title="this.$store.state.user.userInfo.username"
|
|
|
+ />
|
|
|
+ </v-avatar>
|
|
|
+ <span class="text-h6 font-weight-light">{{ this.$store.state.user.userInfo.username }}</span>
|
|
|
+ </v-card-title>
|
|
|
+ <v-card-text class="text-h5 font-weight-light">
|
|
|
+ {{ this.$store.state.user.userInfo.intro }}
|
|
|
+ </v-card-text>
|
|
|
+ <v-card-text class="text-h5 font-weight-light">
|
|
|
+ 关注 {{ this.$store.state.user.userInfo.followingCount }} | 被关注 {{ this.$store.state.user.userInfo.followerCount }}
|
|
|
+ </v-card-text>
|
|
|
+ </v-card>
|
|
|
+ </v-col>
|
|
|
<v-col cols="12">
|
|
|
<v-card
|
|
|
color="#385F73"
|
|
|
@@ -180,7 +179,8 @@
|
|
|
<script>
|
|
|
import { mapActions, mapGetters } from 'vuex'
|
|
|
import { pubStatus, statusRecommend } from '@/api/mblog/status'
|
|
|
-import StatusCard from '@/components/status/status-card'
|
|
|
+import { videoTimeline } from '@/api/media/video'
|
|
|
+import StatusCard from '@/components/card/status-card'
|
|
|
import FilePondUploadImage from '@/components/upload/filepond-image.vue'
|
|
|
|
|
|
export default {
|
|
|
@@ -231,6 +231,7 @@ export default {
|
|
|
},
|
|
|
created() {
|
|
|
this.getFollowingStatus(this.page)
|
|
|
+ this.getTimeline(this.page)
|
|
|
},
|
|
|
mounted() {
|
|
|
},
|
|
|
@@ -244,6 +245,25 @@ export default {
|
|
|
this.getFollowingStatus(this.page)
|
|
|
}, 1000)
|
|
|
},
|
|
|
+ getTimeline(page) {
|
|
|
+ videoTimeline(page)
|
|
|
+ .then(res => {
|
|
|
+ if (res.code === 0) {
|
|
|
+ for (const item of res.data.list) {
|
|
|
+ console.log(item)
|
|
|
+ }
|
|
|
+ this.page += 1
|
|
|
+ this.busy = false
|
|
|
+ } else {
|
|
|
+ this.message = res.msg
|
|
|
+ this.showMessage = true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(error => {
|
|
|
+ this.message = error.message
|
|
|
+ this.showMessage = true
|
|
|
+ })
|
|
|
+ },
|
|
|
getFollowingStatus(page) {
|
|
|
statusRecommend(page)
|
|
|
.then(res => {
|
|
|
@@ -254,11 +274,13 @@ export default {
|
|
|
this.page += 1
|
|
|
this.busy = false
|
|
|
} else {
|
|
|
- console.error(res.msg)
|
|
|
+ this.message = res.msg
|
|
|
+ this.showMessage = true
|
|
|
}
|
|
|
})
|
|
|
.catch(error => {
|
|
|
- console.error(error.message)
|
|
|
+ this.message = error.message
|
|
|
+ this.showMessage = true
|
|
|
})
|
|
|
},
|
|
|
myContent(page) {
|
|
|
@@ -282,6 +304,9 @@ export default {
|
|
|
this.showMessage = true
|
|
|
}
|
|
|
},
|
|
|
+ setFile() {
|
|
|
+ console.log('选择文件')
|
|
|
+ },
|
|
|
publish() {
|
|
|
if (this.statusPost.content === '') {
|
|
|
this.message = '内容不能为空'
|