diff --git a/client/src/api/file.js b/client/src/api/file.js index dd9e644..207720e 100644 --- a/client/src/api/file.js +++ b/client/src/api/file.js @@ -1,3 +1,9 @@ +import { getToken } from "@/utils/auth"; + export function uploadUrl() { - return process.env.VUE_APP_BASE_API + '/upload/' + return process.env.VUE_APP_BASE_API + '/file/' } + +export function upHeaders() { + return { Authorization: "Bearer " + getToken() } +} \ No newline at end of file diff --git a/client/src/router/index.js b/client/src/router/index.js index 690af7b..eb9e8bc 100644 --- a/client/src/router/index.js +++ b/client/src/router/index.js @@ -124,7 +124,7 @@ export const asyncRoutes = [ ] }, { - path: 'external-link', + path: 'external-link2', component: Layout, children: [ { diff --git a/client/src/utils/request.js b/client/src/utils/request.js index ba24b52..a8533cb 100644 --- a/client/src/utils/request.js +++ b/client/src/utils/request.js @@ -45,7 +45,7 @@ service.interceptors.response.use( const res = response.data // 50008: Illegal token; 50012: Other clients logged in; 50014: Token expired; if (res.code === 401) { - MessageBox.confirm('您已退出,您可以停留在本页或者重新登陆.', '确认退出', { + MessageBox.confirm('认证失败,请重新登陆.', '确认退出', { confirmButtonText: '重新登陆', cancelButtonText: '取消', type: 'warning' diff --git a/client/src/views/system/user.vue b/client/src/views/system/user.vue index e0526b3..83a936e 100644 --- a/client/src/views/system/user.vue +++ b/client/src/views/system/user.vue @@ -18,7 +18,7 @@ @node-click="handleOrgClick" /> - +
@@ -199,13 +199,12 @@