update sidebar and episode router
This commit is contained in:
1 parent
f418ed47da
commit
1eb713aaf4
7 files changed
+174
-60
No files matched your search
@@ -70,19 +70,22 @@ interface IData {
|
||||
course: ICourse | undefined;
|
||||
episodes: IEpisode[] | undefined;
|
||||
loading: boolean;
|
||||
id: number;
|
||||
}
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CourseDetail',
|
||||
data(): IData {
|
||||
return {
|
||||
id: parseInt(this.$route.params.id.toString()),
|
||||
course: undefined,
|
||||
episodes: [],
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
id() {
|
||||
return parseInt(this.$route.params.id.toString());
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
this.loading = true;
|
||||
courseService.get(this.id).then(({ data: data }: { data: ICourseDetailResponse }) => {
|
||||
|
||||
Reference in new issue
Block a user