diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 101407f..720baa0 100755 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -3,24 +3,20 @@ - + + - - - - - diff --git a/client/src/router/index.ts b/client/src/router/index.ts index d01389b..444a5f0 100644 --- a/client/src/router/index.ts +++ b/client/src/router/index.ts @@ -1,37 +1,37 @@ -import Vue from 'vue'; -import VueRouter, { RouteConfig } from 'vue-router'; -import Home from '../views/Home.vue'; -import Login from '../views/login.vue'; -import Register from '../views/register.vue'; -import Game from '../views/game.vue'; - -Vue.use(VueRouter); - -const routes: RouteConfig[] = [ - { - path: '/', - name: 'home', - component: Home, - }, - { - path: '/login', - name: 'login', - component: Login, - }, - { - path: '/register', - name: 'register', - component: Register, - }, - { - path: '/game/:roomNumber', - name: 'game', - component: Game, - }, -]; - -const router = new VueRouter({ - routes, -}); - -export default router; +import Vue from 'vue'; +import VueRouter, { RouteConfig } from 'vue-router'; +import Home from '../views/Home.vue'; +import Login from '../views/login.vue'; +import Register from '../views/register.vue'; +import Game from '../views/game.vue'; + +Vue.use(VueRouter); + +const routes: RouteConfig[] = [ + { + path: '/', + name: 'home', + component: Home, + }, + { + path: '/login', + name: 'login', + component: Login, + }, + { + path: '/register', + name: 'register', + component: Register, + }, + { + path: '/game/:roomNumber/:isOwner?', + name: 'game', + component: Game, + }, +]; + +const router = new VueRouter({ + routes, +}); + +export default router; diff --git a/client/src/utils/request.ts b/client/src/utils/request.ts index 01806c2..2a45bd8 100644 --- a/client/src/utils/request.ts +++ b/client/src/utils/request.ts @@ -2,7 +2,7 @@ import axios, {AxiosRequestConfig, Method} from 'axios'; import cookie from 'js-cookie'; const request = async ({method = 'post' as Method, url = '', body = {}, timeout = 8000}) => { - const origin = 'http://192.168.0.101:7001/node'; + const origin = 'http://192.168.0.103:7001/node'; // const origin = 'http://172.22.72.70:7001/node'; if (!url) { return Promise.reject('Request url is null!'); diff --git a/client/src/views/Home.vue b/client/src/views/Home.vue index edfcab4..581305c 100644 --- a/client/src/views/Home.vue +++ b/client/src/views/Home.vue @@ -1,49 +1,62 @@ - - - - + + + + diff --git a/client/src/views/game.vue b/client/src/views/game.vue index afaf2bf..db87f05 100644 --- a/client/src/views/game.vue +++ b/client/src/views/game.vue @@ -1,17 +1,18 @@