From ab8842345f40ffa279b81daa2ad7aeb1b391fb64 Mon Sep 17 00:00:00 2001 From: haozq <1611483981@qq.com> Date: Sat, 8 Feb 2025 18:17:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/user.js | 14 +++++++----- .../proMaterialManagement/upload/index.vue | 22 +++++++++---------- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 893f761..a0c0ad1 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -79,11 +79,15 @@ const user = { return new Promise((resolve, reject) => { login(username, password, code, uuid).then(res => { let data = res.data - setToken(data.access_token) - commit('SET_TOKEN', data.access_token) - setExpiresIn(data.expires_in) - commit('SET_EXPIRES_IN', data.expires_in) - resolve() + if(data.code && data.code===500){ + reject(data); + }else { + setToken(data.access_token) + commit('SET_TOKEN', data.access_token) + setExpiresIn(data.expires_in) + commit('SET_EXPIRES_IN', data.expires_in) + resolve() + } }).catch(error => { reject(error) }) diff --git a/src/views/proMaterialManagement/upload/index.vue b/src/views/proMaterialManagement/upload/index.vue index f8d891a..08c2f91 100644 --- a/src/views/proMaterialManagement/upload/index.vue +++ b/src/views/proMaterialManagement/upload/index.vue @@ -35,17 +35,17 @@ - - 导出数据 - - + + + + + + + + + + +