diff --git a/src/router/index.js b/src/router/index.js index 26333fd..5326abe 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -3,7 +3,7 @@ import Home from '@/views/Home.vue' import {createWebHistory} from "vue-router/dist/vue-router.esm-browser" import Login from "@/views/Login.vue" import Project from "@/views/Project.vue"; - +import OngoingProject from "../views/OngoingProject"; const routes = [ { path: '/', @@ -12,7 +12,7 @@ const routes = [ children: [ { path: '', - component: Project, + component: OngoingProject, }, ], }, diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index b6b3867..fcf28aa 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -1,3 +1,3 @@ -//const baseUrl = "http://localhost:8090/" -const baseUrl = "http://36.5.61.1:8081/" +const baseUrl = "http://192.168.31.194:8081/" +//const baseUrl = "http://36.5.61.1:8081/" export default baseUrl; \ No newline at end of file diff --git a/src/utils/request.js b/src/utils/request.js index 40b3e2b..b70a465 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -20,27 +20,15 @@ request.interceptors.request.use( request.interceptors.response.use( function (response) { // 2xx 范围内的状态码都会触发该函数。 - console.log("success") - if(localStorage.getItem('expire')) - { - let time = new Date().getTime() - Number(localStorage.getItem('expire')) - if(time > 30*60*1000) - { - request({ - url: '/api/refreshToken', - method: 'get', - }).then(response => { - console.log(response.data) - localStorage.setItem('token', response.data) - localStorage.setItem('expire', new Date().getTime().toString()) - }) - } - } + console.log("SUCCESS") + return response }, function (error) { - console.log( error.response.status) + console.log("ERROR") + console.log(error.response) //if(error.response.status===403) //router.push({path: '/login'}) + return Promise.reject(error) }); export default request diff --git a/src/views/Home.vue b/src/views/Home.vue index 3eea1d1..9781142 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -1,85 +1,55 @@ -