| | |
| | | if (res.data && res.data.data) { |
| | | // 这里假设使用decryptBySM4进行解密 |
| | | res.data.data = decryptBySM4(res.data.data); |
| | | console.log('加密',res.data.data) |
| | | } |
| | | } catch (e) { |
| | | console.error('数据解密失败:', e); |
| | | } |
| | | } |
| | | |
| | | console.log('rewdsada', res); |
| | | |
| | | if (res.data.code == 500) { |
| | | Message({ |
| | |
| | | }) |
| | | return |
| | | } |
| | | if (res.data &&res.data.code == 401) { |
| | | Message({ |
| | | message: res.data.msg || '登录已过期,请重新登录', |
| | | type: 'warning', |
| | | duration: 2000 |
| | | }) |
| | | sessionStorage.clear(); |
| | | window.location.replace('/'); |
| | | return |
| | | } |
| | | |
| | | if (res.data && res.data.data &&res.data.data.code == 401) { |
| | | Message({ |