| | |
| | | } |
| | | config.headers.Authorization = `${authorization}`; |
| | | } |
| | | config.headers.Authorization = 'Ijg3NmFjZjJlNGIzMzExZWY4NzI0MDI0MmFjMTIwMDA2Ig.ZqNvxw.Kgp8PcT4n2cxpzxFrYHttO4i2Eo'; |
| | | config.headers.Authorization = 'IjFjOWY3OWM0NGUxYzExZWZhMDk0MDI0MmFjMTIwMDA2Ig.ZqhQ-w.JmA9ESUTd_JKK2wtZ4PVgVmCNj8'; |
| | | return config; |
| | | }, |
| | | (error) => { |
| | |
| | | const res = response.data; |
| | | |
| | | // if the custom code is not 20000, it is judged as an error. |
| | | if ((res.retcode && res.retcode !== 0) || (res.code && res.code !== 20000)) { |
| | | /*if ((res.retcode && res.retcode !== 0) || (res.code && res.code !== 20000)) { |
| | | Message.error({ |
| | | content: res.msg || 'Error', |
| | | duration: 5 * 1000, |
| | |
| | | |
| | | if(response.config.url === '/v1/user/login'|| response.config.url === '/base/login') { |
| | | setAuthorization(response.headers.authorization); |
| | | } |
| | | }*/ |
| | | return res; |
| | | }, |
| | | (error) => { |