|
|
@@ -64,10 +64,14 @@
|
|
|
<v-divider />
|
|
|
<v-divider />
|
|
|
<v-divider />
|
|
|
- <v-card>
|
|
|
- <v-container fill-height>
|
|
|
- <div id="top" />
|
|
|
- <v-row v-if="cardType === 'video'">
|
|
|
+ <div v-if="type === 1">
|
|
|
+ <v-card
|
|
|
+ light
|
|
|
+ >
|
|
|
+ <v-card-title class="text-h5">
|
|
|
+ 最近投稿
|
|
|
+ </v-card-title>
|
|
|
+ <v-row>
|
|
|
<v-col
|
|
|
v-for="item in cardList"
|
|
|
:key="item.videoId"
|
|
|
@@ -75,44 +79,22 @@
|
|
|
<video-card :video="item" />
|
|
|
</v-col>
|
|
|
</v-row>
|
|
|
- <v-row v-if="cardType === 'status'">
|
|
|
- <v-col
|
|
|
- v-for="item in cardList"
|
|
|
- :key="item.statusId"
|
|
|
- >
|
|
|
- <status-card :item="item" />
|
|
|
- </v-col>
|
|
|
- </v-row>
|
|
|
- <v-row v-if="cardType === 'answer'">
|
|
|
- <v-col
|
|
|
- v-for="item in cardList"
|
|
|
- :key="item.audioId"
|
|
|
- >
|
|
|
- <audio-card :item="item" />
|
|
|
- </v-col>
|
|
|
- </v-row>
|
|
|
- </v-container>
|
|
|
- <v-divider />
|
|
|
- </v-card>
|
|
|
+ </v-card>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { userVideoList } from '@/api/media/video'
|
|
|
import { getUserInfo } from '@/api/user/user'
|
|
|
import Power from '@/utils/check-power.vue'
|
|
|
import TimeUtil from '@/utils/time-util.vue'
|
|
|
-
|
|
|
-import StatusCard from '@/components/card/status-card'
|
|
|
+import { userVideoList } from '@/api/media/video'
|
|
|
import VideoCard from '@/components/card/video-card.vue'
|
|
|
-import AudioCard from '@/components/card/audio-card.vue'
|
|
|
|
|
|
export default {
|
|
|
name: 'UserHome',
|
|
|
components: {
|
|
|
- StatusCard,
|
|
|
- VideoCard,
|
|
|
- AudioCard
|
|
|
+ VideoCard
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
@@ -121,10 +103,9 @@ export default {
|
|
|
loginUserId: 0,
|
|
|
userId: 0,
|
|
|
userInfo: {},
|
|
|
- cardType: null,
|
|
|
cardList: [],
|
|
|
page: 1,
|
|
|
- type: 0
|
|
|
+ type: 1
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
@@ -149,20 +130,11 @@ export default {
|
|
|
|
|
|
this.type = type
|
|
|
if (type === 1) {
|
|
|
- this.$router.push('/u/' + this.userId + '/post')
|
|
|
- /* this.initPagerParam()
|
|
|
this.getVideoList(1)
|
|
|
- this.$vuetify.goTo(type)*/
|
|
|
} else if (type === 2) {
|
|
|
this.$router.push('/u/' + this.userId + '/status')
|
|
|
- /* this.initPagerParam()
|
|
|
- this.getStatusList(1)
|
|
|
- this.$vuetify.goTo(type)*/
|
|
|
} else if (type === 3) {
|
|
|
- this.$router.push('/u/' + this.userId + '/post')
|
|
|
- /* this.initPagerParam()
|
|
|
- this.getAnswerList(1)
|
|
|
- this.$vuetify.goTo(type)*/
|
|
|
+ this.$router.push('/u/' + this.userId + '/video')
|
|
|
}
|
|
|
},
|
|
|
getUserInfo1(userId) {
|
|
|
@@ -180,7 +152,6 @@ export default {
|
|
|
getVideoList(page) {
|
|
|
userVideoList(page, this.userId).then(res => {
|
|
|
if (res.code === 0) {
|
|
|
- this.cardType = 'video'
|
|
|
this.$vuetify.goTo(0)
|
|
|
|
|
|
const pageList = res.data
|