update sidebar and episode router

This commit is contained in:
AceDataCloud committed 2022-04-02 00:17:17 +08:00
1 parent f418ed47da
commit 1eb713aaf4
7 files changed
+174 -60

No files matched your search

+5 -2
View File
@@ -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 }) => {