|
|
@@ -26,174 +26,6 @@
|
|
|
<v-container fill-height style="padding-top: 0px;">
|
|
|
<v-row v-resize="onResize" no-gutters>
|
|
|
<v-col :cols="colsWidth">
|
|
|
- <v-row>
|
|
|
- <v-col cols="2">
|
|
|
- <v-btn icon @click="thumbsupVideo">
|
|
|
- <v-icon>mdi-thumb-up</v-icon>
|
|
|
- <span>点赞(10000)</span>
|
|
|
- </v-btn>
|
|
|
- </v-col>
|
|
|
- <v-col cols="2">
|
|
|
- <v-btn icon @click="collectVideo">
|
|
|
- <v-icon>mdi-bookmark</v-icon>
|
|
|
- <span>收藏(10000)</span>
|
|
|
- </v-btn>
|
|
|
- </v-col>
|
|
|
- <v-col cols="2">
|
|
|
- <v-btn icon @click="openRepostDialog">
|
|
|
- <v-icon>mdi-repeat</v-icon>
|
|
|
- <span>转发(10000)</span>
|
|
|
- </v-btn>
|
|
|
- <v-dialog
|
|
|
- v-model="showRepostDialog"
|
|
|
- persistent
|
|
|
- max-width="600px"
|
|
|
- >
|
|
|
- <v-card>
|
|
|
- <v-card-text>
|
|
|
- <span>https://bili.reghao.cn/video/lajfda</span>
|
|
|
- </v-card-text>
|
|
|
- <v-card-actions>
|
|
|
- <v-spacer />
|
|
|
- <v-btn
|
|
|
- color="blue darken-1"
|
|
|
- text
|
|
|
- @click="showRepostDialog = false"
|
|
|
- >
|
|
|
- 关闭
|
|
|
- </v-btn>
|
|
|
- </v-card-actions>
|
|
|
- </v-card>
|
|
|
- </v-dialog>
|
|
|
- </v-col>
|
|
|
- <v-col cols="2">
|
|
|
- <v-btn icon @click="openSuggestDialog">
|
|
|
- <v-icon>mdi-thumb-up</v-icon>
|
|
|
- <span>反馈</span>
|
|
|
- </v-btn>
|
|
|
- <v-dialog
|
|
|
- v-model="showDialog"
|
|
|
- persistent
|
|
|
- max-width="600px"
|
|
|
- >
|
|
|
- <v-card>
|
|
|
- <v-card-title>
|
|
|
- <span class="text-h5">问题或建议</span>
|
|
|
- </v-card-title>
|
|
|
- <v-card-text>
|
|
|
- <v-container>
|
|
|
- <v-row>
|
|
|
- <v-col
|
|
|
- cols="12"
|
|
|
- sm="6"
|
|
|
- >
|
|
|
- <v-select
|
|
|
- :items="['视频封面', '视频播放', '视频内容']"
|
|
|
- label="问题分类"
|
|
|
- required
|
|
|
- />
|
|
|
- </v-col>
|
|
|
- <v-col
|
|
|
- cols="24"
|
|
|
- sm="6"
|
|
|
- md="4"
|
|
|
- >
|
|
|
- <v-text-field
|
|
|
- label="问题或建议"
|
|
|
- required
|
|
|
- />
|
|
|
- </v-col>
|
|
|
- </v-row>
|
|
|
- </v-container>
|
|
|
- </v-card-text>
|
|
|
- <v-card-actions>
|
|
|
- <v-spacer />
|
|
|
- <v-btn
|
|
|
- color="blue darken-1"
|
|
|
- text
|
|
|
- @click="showDialog = false"
|
|
|
- >
|
|
|
- 关闭
|
|
|
- </v-btn>
|
|
|
- <v-btn
|
|
|
- color="blue darken-1"
|
|
|
- text
|
|
|
- @click="submitVideoErr"
|
|
|
- >
|
|
|
- 提交
|
|
|
- </v-btn>
|
|
|
- </v-card-actions>
|
|
|
- </v-card>
|
|
|
- </v-dialog>
|
|
|
- </v-col>
|
|
|
- <v-col cols="2">
|
|
|
- <v-btn icon @click="openEditDialog">
|
|
|
- <v-icon>mdi-thumb-up</v-icon>
|
|
|
- <span>编辑</span>
|
|
|
- </v-btn>
|
|
|
- <v-dialog
|
|
|
- v-model="showEditDialog"
|
|
|
- persistent
|
|
|
- max-width="600px"
|
|
|
- >
|
|
|
- <v-form
|
|
|
- ref="form"
|
|
|
- v-model="editVideo"
|
|
|
- lazy-validation
|
|
|
- >
|
|
|
- <v-text-field
|
|
|
- v-model="videoId"
|
|
|
- label="视频 ID"
|
|
|
- required
|
|
|
- />
|
|
|
-
|
|
|
- <v-text-field
|
|
|
- v-model="editVideo.pubDate"
|
|
|
- label="发布日期"
|
|
|
- required
|
|
|
- />
|
|
|
-
|
|
|
- <v-btn
|
|
|
- color="success"
|
|
|
- class="mr-4"
|
|
|
- @click="submitEdit"
|
|
|
- >
|
|
|
- 提交
|
|
|
- </v-btn>
|
|
|
-
|
|
|
- <v-btn
|
|
|
- color="error"
|
|
|
- class="mr-4"
|
|
|
- @click="resetEdit"
|
|
|
- >
|
|
|
- 重置
|
|
|
- </v-btn>
|
|
|
- <v-btn
|
|
|
- color="error"
|
|
|
- class="mr-4"
|
|
|
- @click="showEditDialog = false"
|
|
|
- >
|
|
|
- 取消
|
|
|
- </v-btn>
|
|
|
- </v-form>
|
|
|
- </v-dialog>
|
|
|
- </v-col>
|
|
|
- </v-row>
|
|
|
- <!--<v-row>
|
|
|
- <v-col style="color: #999;font-size: 12px;padding-top: 0px;">
|
|
|
- <!–
|
|
|
- TODO 视频分类待完成
|
|
|
- <router-link v-if="videoData.childrenCategory.fatherId !== 0" :to="`/v/${videoData.fatherCategory.id}`" class="category-link">
|
|
|
- <span v-text="videoData.fatherCategory.name" />
|
|
|
- </router-link>
|
|
|
- /
|
|
|
- <router-link :to="`/v/${videoData.childrenCategory.id}`" class="category-link">
|
|
|
- <span v-text="videoData.childrenCategory.name" />
|
|
|
- </router-link>–>
|
|
|
- <span v-html="' '" />
|
|
|
- </v-col>
|
|
|
- </v-row>-->
|
|
|
- <v-divider />
|
|
|
<v-row>
|
|
|
<v-col>
|
|
|
<span v-text="videoData.description" />
|
|
|
@@ -203,9 +35,6 @@
|
|
|
<v-row>
|
|
|
<v-col>
|
|
|
<span >{{videoData.tags}}</span>
|
|
|
-<!-- <span v-for="item in videoData.tags" :key="item">
|
|
|
- <v-btn rounded small text color="primary" dark @click="jumpToTagPage(item)">{{ item }}</v-btn>
|
|
|
- </span>-->
|
|
|
</v-col>
|
|
|
</v-row>
|
|
|
<v-divider />
|
|
|
@@ -222,28 +51,6 @@
|
|
|
<span v-text="videoData.username" />
|
|
|
</router-link>
|
|
|
<span v-html="' '" />
|
|
|
- <v-btn small outlined color="primary" @click="followingUser">
|
|
|
- <span>关注</span>
|
|
|
- <span v-html="' '" />
|
|
|
- <span v-text="videoData.followerCount" />
|
|
|
- </v-btn>
|
|
|
- </v-col>
|
|
|
- </v-row>
|
|
|
- </v-col>
|
|
|
- </v-row>
|
|
|
- <v-row>
|
|
|
- <v-col :cols="colsWidth">
|
|
|
- <!-- <CommentCard v-if="videoData !== null" :video="videoData" />-->
|
|
|
- <CommentCard v-if="showComment === true" :video="videoData" />
|
|
|
- </v-col>
|
|
|
- <v-col>
|
|
|
- 相关推荐:
|
|
|
- <v-row no-gutters>
|
|
|
- <v-col
|
|
|
- v-for="item in videoList"
|
|
|
- :key="item.videoId"
|
|
|
- >
|
|
|
- <item-card :video="item" />
|
|
|
</v-col>
|
|
|
</v-row>
|
|
|
</v-col>
|
|
|
@@ -254,16 +61,12 @@
|
|
|
|
|
|
<script>
|
|
|
import { similarVideo, videoInfo } from '@/api/media/video'
|
|
|
-import ItemCard from '@/components/card/item-card.vue'
|
|
|
-import CommentCard from '@/components/card/comment-card.vue'
|
|
|
import VideoPlayer from '@/components/player/player.vue'
|
|
|
import TimeUtil from '@/utils/time-util.vue'
|
|
|
|
|
|
export default {
|
|
|
name: 'Video',
|
|
|
components: {
|
|
|
- ItemCard,
|
|
|
- CommentCard,
|
|
|
VideoPlayer
|
|
|
},
|
|
|
data() {
|
|
|
@@ -296,7 +99,6 @@ export default {
|
|
|
// 请求后端获取数据
|
|
|
this.getVideoInfo(this.videoId)
|
|
|
this.onResize()
|
|
|
- this.getSimilarVideos(this.videoId)
|
|
|
},
|
|
|
mounted() {
|
|
|
},
|
|
|
@@ -331,59 +133,6 @@ export default {
|
|
|
.catch(error => {
|
|
|
console.error(error.message)
|
|
|
})
|
|
|
- },
|
|
|
- // 获取和当前视频类似的其他视频
|
|
|
- getSimilarVideos(videoId) {
|
|
|
- similarVideo(videoId)
|
|
|
- .then(res => {
|
|
|
- if (res.code === 0) {
|
|
|
- this.videoList = res.data
|
|
|
- } else {
|
|
|
- console.error(res.msg)
|
|
|
- }
|
|
|
- })
|
|
|
- .catch(error => {
|
|
|
- console.error(error.message)
|
|
|
- })
|
|
|
- },
|
|
|
- followingUser() {
|
|
|
- console.log('关注 UP 主')
|
|
|
- },
|
|
|
- thumbsupVideo() {
|
|
|
- console.log('点赞 ' + this.videoId)
|
|
|
- },
|
|
|
- collectVideo() {
|
|
|
- console.log('收藏 ' + this.videoId)
|
|
|
- },
|
|
|
- jumpToTagPage(value) {
|
|
|
- console.log('跳转到标签页: ' + value)
|
|
|
- this.$router.push({
|
|
|
- path: '/tag/result',
|
|
|
- query: {
|
|
|
- tag: value,
|
|
|
- page: 1
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- openRepostDialog() {
|
|
|
- this.showRepostDialog = true
|
|
|
- console.log('获取一个 short url')
|
|
|
- },
|
|
|
- openSuggestDialog() {
|
|
|
- this.showDialog = true
|
|
|
- },
|
|
|
- openEditDialog() {
|
|
|
- this.showEditDialog = true
|
|
|
- },
|
|
|
- submitVideoErr() {
|
|
|
- this.showDialog = false
|
|
|
- console.log('提交视频错误')
|
|
|
- },
|
|
|
- submitEdit() {
|
|
|
- console.log('提交编辑信息')
|
|
|
- },
|
|
|
- resetEdit() {
|
|
|
- console.log('重置编辑信息')
|
|
|
}
|
|
|
}
|
|
|
}
|