论坛,聊天室前后端对接
Change-Id: I90740329ab40dc050e8a791a382ab187900d673a
diff --git a/src/router/index.js b/src/router/index.js
index 41af4c6..b2854a4 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -6,6 +6,9 @@
import LoginView from '@/views/auth/LoginView.vue'
import RegisterView from '@/views/auth/RegisterView.vue'
import HomeView from '@/views/HomeView.vue'
+import ForumView from '@/views/forum/ForumView.vue'
+import TopicView from '@/views/forum/TopicView.vue'
+import ChatRoom from '@/views/ChatRoom.vue'
const routes = [
{
@@ -68,7 +71,7 @@
}
},
{
- path: '/torrent/:infoHash',
+ path: '/torrent/:id',
name: 'TorrentDetail',
component: () => import('@/views/torrent/TorrentDetailView.vue'),
meta: {
@@ -79,12 +82,8 @@
// 论坛相关路由
{
path: '/forum',
- name: 'Forum',
- component: () => import('@/views/forum/ForumView.vue'),
- meta: {
- title: 'PT Tracker - 论坛',
- requiresAuth: true
- }
+ name: 'forum',
+ component: ForumView
},
{
path: '/forum/section/:id',
@@ -97,10 +96,15 @@
},
{
path: '/forum/topic/:id',
- name: 'ForumTopic',
- component: () => import('@/views/forum/ForumTopicView.vue'),
+ name: 'topic',
+ component: TopicView
+ },
+ {
+ path: '/chat',
+ name: 'ChatRoom',
+ component: ChatRoom,
meta: {
- title: 'PT Tracker - 主题详情',
+ title: 'PT Tracker - 聊天室',
requiresAuth: true
}
},