From af18fd6fb9e1a500be5369550b737ccce12a7d23 Mon Sep 17 00:00:00 2001 From: 马宇豪 <978517621@qq.com> Date: 星期二, 18 四月 2023 14:29:22 +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