From 70da1652e00de66b54e9651639c1bf6dda88b357 Mon Sep 17 00:00:00 2001 From: Your Name <123456> Date: 星期五, 17 二月 2023 16:26:40 +0800 Subject: [PATCH] 页面 --- src/utils/request.ts | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/utils/request.ts b/src/utils/request.ts index 21107e5..10500ec 100644 --- a/src/utils/request.ts +++ b/src/utils/request.ts @@ -15,11 +15,11 @@ service.interceptors.request.use( (config) => { - for (let key in config.data) { - if (config.data[key] == '' && config.data[key] !== 0) { - config.data[key] = null; - } - } + // for (let key in config.data) { + // if (config.data[key] == '' && config.data[key] !== 0) { + // config.data[key] = null; + // } + // } if (Cookies.get('token')) { (<any>config.headers).common['tk'] = `${Cookies.get('token')}`; (<any>config.headers).common['uid'] = `${Cookies.get('uid')}`; @@ -63,7 +63,7 @@ Session.clear(); window.location.href = '/'; }); - } else if (response.data.code && response.data.code === 'A0215') { + } else if (response.data.code && response.data.code === 405) { ElMessage.error('token失效'); // logOut; useLoginApi() -- Gitblit v1.9.2