|
|
@@ -45,10 +45,19 @@
|
|
|
icon="el-icon-thumb"
|
|
|
:disabled="isCollected"
|
|
|
class="tag"
|
|
|
- @click="collection(video)"
|
|
|
+ @click="likeVideo(video)"
|
|
|
>
|
|
|
<span>喜欢 {{ video.thumbUp }}</span>
|
|
|
</el-button>
|
|
|
+ <el-button
|
|
|
+ type="success"
|
|
|
+ size="mini"
|
|
|
+ icon="el-icon-thumb"
|
|
|
+ class="tag"
|
|
|
+ @click="dislikeVideoWrapper(video)"
|
|
|
+ >
|
|
|
+ <span>不喜欢 {{ video.thumbUp }}</span>
|
|
|
+ </el-button>
|
|
|
<el-button
|
|
|
type="success"
|
|
|
size="mini"
|
|
|
@@ -255,6 +264,7 @@ import { collectItem, createAlbum, getUserPlaylist } from '@/api/collect'
|
|
|
import { getUserInfo } from '@/api/user'
|
|
|
import { publishComment, getComment } from '@/api/comment'
|
|
|
import { getAuthedUser } from '@/utils/auth'
|
|
|
+import { dislikeVideo } from '@/api/content'
|
|
|
|
|
|
export default {
|
|
|
name: 'VideoPage',
|
|
|
@@ -499,6 +509,20 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ likeVideo(video) {
|
|
|
+ const videoId = video.videoId
|
|
|
+ this.$message.info('喜欢 ' + videoId)
|
|
|
+ },
|
|
|
+ dislikeVideoWrapper(video) {
|
|
|
+ const payload = {
|
|
|
+ videoId: video.videoId
|
|
|
+ }
|
|
|
+ dislikeVideo(payload).then(resp => {
|
|
|
+ if (resp.code === 0) {
|
|
|
+ this.$message.info('数据已提交')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
getShareUrl(videoId) {
|
|
|
getShortUrl(videoId).then(resp => {
|
|
|
if (resp.code === 0) {
|