diff --git a/src/components/Channel.vue b/src/components/Channel.vue index 18356163..ba904bf9 100644 --- a/src/components/Channel.vue +++ b/src/components/Channel.vue @@ -51,7 +51,14 @@ export default { }, methods: { async fetchChannel() { - return await this.fetchJson(Constants.BASE_URL + "/channels/" + this.$route.params.channelId); + const url = + Constants.BASE_URL + + (this.$route.params.channelId + ? "/channels/" + this.$route.params.channelId + : this.$route.params.channelC + ? "/c/" + this.$route.params.channelC + : "/user/" + this.$route.params.channelUser); + return await this.fetchJson(url); }, async getChannelData() { this.fetchChannel() @@ -65,7 +72,7 @@ export default { this.fetchJson( Constants.BASE_URL + "/nextpage/channels/" + - this.$route.params.channelId + + this.channel.id + "?url=" + encodeURIComponent(this.channel.nextpage) + "&id=" + diff --git a/src/router/router.js b/src/router/router.js index 1a5b8066..1b84869f 100644 --- a/src/router/router.js +++ b/src/router/router.js @@ -13,7 +13,17 @@ const routes = [ }, { path: "/channel/:channelId", - name: "Channel", + name: "ChannelId", + component: () => import("../components/Channel.vue"), + }, + { + path: "/c/:channelC", + name: "ChannelC", + component: () => import("../components/Channel.vue"), + }, + { + path: "/user/:channelUser", + name: "ChannelUser", component: () => import("../components/Channel.vue"), }, {