parent
e7cd5db831
commit
43e876ba80
6 changed files with 92 additions and 43 deletions
|
|
@ -15,6 +15,16 @@ const routes = [
|
|||
path: '/login',
|
||||
component: Login
|
||||
},
|
||||
{
|
||||
path: '/join/:room?',
|
||||
redirect: from => {
|
||||
const room = from.hash;
|
||||
if (room) {
|
||||
return { name: 'Chat', params: { joinRoom: room }};
|
||||
}
|
||||
return '/';
|
||||
}
|
||||
},
|
||||
]
|
||||
|
||||
const router = new VueRouter({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue