19
19
<v-col v-else cols =" 11" class =" mx-auto" >
20
20
<v-row >
21
21
<v-col cols =" 12" sm =" 12" md =" 8" lg =" 8" >
22
- <!-- <component
23
- :is="transition !== 'None' ? `v-${transition}` : 'div'"
24
- hide-on-leave
25
- > -->
26
22
<v-skeleton-loader
27
23
type =" card-avatar, article, actions"
28
24
:loading =" videoLoading"
38
34
/>
39
35
</video >
40
36
</v-responsive >
41
- <!-- </div> -->
37
+
42
38
<v-card flat tile class =" card" >
43
39
<v-card-title class =" pl-0 pb-0" >{{
44
40
video.title
158
154
</v-col >
159
155
</v-row >
160
156
</div >
161
- <!-- </component> -->
162
157
</v-skeleton-loader >
163
158
164
159
<v-row >
@@ -271,28 +266,16 @@ export default {
271
266
const video = await VideoService .getById (this .$route .params .id )
272
267
273
268
if (! video) return this .$router .push (' /' )
274
-
275
- // video.data.data.url = `${process.env.VUE_APP_URL}/uploads/videos/${video.data.data.url}`
276
-
277
- // video.data.data.userId.photoUrl = `${process.env.VUE_APP_URL}/uploads/avatars/${video.data.data.userId.photoUrl}`
278
269
this .video = video .data .data
279
- // this.video.likes = 2
280
- // this.video.dislikes = 2
281
270
} catch (err) {
282
271
this .errored = true
283
272
console .log (err)
284
273
} finally {
285
274
this .videoLoading = false
286
275
this .checkSubscription (this .video .userId ._id )
287
276
this .checkFeeling (this .video ._id )
288
- // if (this.video.url != '' && this.video.userId != '')
289
- // this.videoLoading = false
290
277
}
291
- // console.log(video.data.data)
292
- // this.videoLoading = false
293
- // this.video.url =
294
- // this.video.userId.photoUrl = `${process.env.VUE_APP_URL}/uploads/avatars/${this.video.userId.photoUrl}`
295
- // console.log(this.video)
278
+
296
279
if (
297
280
this .video .userId ._id .toString () !==
298
281
this .$store .getters .currentUser ._id .toString () &&
@@ -345,8 +328,6 @@ export default {
345
328
else if (feeling .data .data .feeling === ' dislike' ) this .feeling = ' dislike'
346
329
},
347
330
async createFeeling (type ) {
348
- // console.log(this.video)
349
- // Check type
350
331
switch (true ) {
351
332
case type === ' like' && this .feeling === ' ' :
352
333
this .feeling = ' like'
@@ -380,8 +361,6 @@ export default {
380
361
this .video .dislikes ++
381
362
// console.log('change to dislike')
382
363
}
383
- // change this.feeling to type
384
- // increase like or dislike
385
364
386
365
const feeling = await FeelingService .createFeeling ({
387
366
videoId: this .video ._id ,
@@ -391,7 +370,6 @@ export default {
391
370
})
392
371
393
372
if (! feeling) return
394
- // console.log(feeling.data.data)
395
373
},
396
374
async subscribe () {
397
375
this .subscribeLoading = true
@@ -413,8 +391,6 @@ export default {
413
391
this .subscribed = true
414
392
this .video .userId .subscribers ++
415
393
}
416
-
417
- console .log (this .subscribed )
418
394
},
419
395
actions () {
420
396
this .getVideo ()
0 commit comments