diff --git a/src/router/index.ts b/src/router/index.ts index 2d09a96..2306f46 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -46,7 +46,12 @@ const router = createRouter({ component: VodView }, { - path: '/:streamer/clip/:slug', + path: '/clip/:slug', + component: ClipView + }, + // suppotrt other clip method + { + path: '/:streamerName/clip/:slug', component: ClipView }, { path: '/:pathMatch(.*)*', component: PageNotFound } diff --git a/src/views/ClipView.vue b/src/views/ClipView.vue index 9c8596c..b90f048 100644 --- a/src/views/ClipView.vue +++ b/src/views/ClipView.vue @@ -56,7 +56,7 @@ export default { const clipSlug = this.$route.params.slug const streamerName = this.$route.params.streamer - await getEndpoint(`api/clips/${streamerName}/${clipSlug}`) + await getEndpoint(`api/clips/${clipSlug}`) .then((data) => { this.data = data })