File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div class =" hello" v-if =" loaded" >
3
- <h1 >{{ data.title }}</h1 >
4
- <div v-for =" episode in data['items']" >
5
- <h3 ><router-link :to =" 'e/'+episode.id" >{{ episode.title }}</router-link ></h3 >
6
- <p >{{ episode.summary }}</p >
3
+ <h1 >{{ episode.title }}</h1 >
4
+ <p >{{ episode.summary }}</p >
7
5
<audio controls =" controls" preload =" none" >
8
6
Your browser doesn't support the audio tag!
9
7
<source :src =" episode.url" >
@@ -17,17 +15,18 @@ export default {
17
15
name: ' EpisodeList' ,
18
16
data () {
19
17
return {
20
- data : {},
18
+ episode : {},
21
19
loaded: false
22
20
}
23
21
},
24
22
created () {
25
- this .getFeed ()
23
+ this .getEp ()
26
24
},
27
25
methods: {
28
- getFeed () {
26
+ getEp () {
29
27
getFeed (data => {
30
- this .data = data
28
+ this .episode = data[' items' ][this .$route .params .id ]
29
+ console .log (this .episode .title )
31
30
this .loaded = true
32
31
})
33
32
}
You can’t perform that action at this time.
0 commit comments