|
|
@@ -91,13 +91,20 @@
|
|
|
</v-col>
|
|
|
</v-row>
|
|
|
</div>
|
|
|
- <v-row>
|
|
|
+ <v-row v-if="cardType === 'video'">
|
|
|
+ <v-col
|
|
|
+ v-for="item in cardList"
|
|
|
+ :key="item.videoId"
|
|
|
+ >
|
|
|
+ <video-card :video="item" />
|
|
|
+ </v-col>
|
|
|
+ </v-row>
|
|
|
+ <v-row v-if="cardType === 'status'">
|
|
|
<v-col
|
|
|
v-for="item in cardList"
|
|
|
- :key="item"
|
|
|
+ :key="item.statusId"
|
|
|
>
|
|
|
- <video-card v-if="cardType === 'video'" :video="item" />
|
|
|
- <status-card v-if="cardType === 'status'" :item="item" />
|
|
|
+ <status-card :item="item" />
|
|
|
</v-col>
|
|
|
</v-row>
|
|
|
<v-row justify="center">
|
|
|
@@ -115,6 +122,7 @@
|
|
|
<script>
|
|
|
import { userVideoList } from '@/api/media/video'
|
|
|
import { getUserInfo } from '@/api/user/user'
|
|
|
+import { userStatus } from '@/api/mblog/status'
|
|
|
import Power from '@/utils/check-power.vue'
|
|
|
import StatusCard from '@/components/card/status-card'
|
|
|
import VideoCard from '@/components/card/video-card.vue'
|
|
|
@@ -220,12 +228,24 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
getStatusList(page) {
|
|
|
- if (this.page === 1) {
|
|
|
- this.cardList = []
|
|
|
- }
|
|
|
+ userStatus(page).then(res => {
|
|
|
+ if (res.code === 0) {
|
|
|
+ this.cardType = 'status'
|
|
|
+ this.$vuetify.goTo(0)
|
|
|
|
|
|
- this.cardType = 'status'
|
|
|
- console.log('获取状态列表')
|
|
|
+ const pageList = res.data
|
|
|
+ this.cardList.splice(0, this.cardList.length)
|
|
|
+ for (const item of pageList.list) {
|
|
|
+ this.cardList.push(item)
|
|
|
+ }
|
|
|
+ this.currentPage = pageList.currentPage
|
|
|
+ this.length = pageList.totalPages
|
|
|
+ } else {
|
|
|
+ alert(res.data)
|
|
|
+ }
|
|
|
+ }).catch(error => {
|
|
|
+ console.error(error.message)
|
|
|
+ })
|
|
|
},
|
|
|
getAnswerList(page) {
|
|
|
if (this.page === 1) {
|