| | |
| | | import NProgress from 'nprogress' |
| | | import 'nprogress/nprogress.css' |
| | | |
| | | // 请求超时时间,10s |
| | | const requestTimeOut = 20 * 1000 |
| | | // 请求超时时间,4分钟 |
| | | const requestTimeOut = 4 * 60 * 1000 |
| | | const success = 200 |
| | | // 更换令牌的时间区间 |
| | | const checkRegion = 5 * 60 * 1000 |
| | |
| | | return tansParams(params) |
| | | }], |
| | | headers: { |
| | | 'Authorization': authorizationValue |
| | | 'Authorization': authorizationValue, |
| | | 'Content-Type': 'application/x-www-form-urlencoded' |
| | | } |
| | | }) |
| | | }, |
| | |
| | | transformRequest: [(params) => { |
| | | return tansParams(params) |
| | | }], |
| | | headers: { |
| | | 'Content-Type': 'application/x-www-form-urlencoded' |
| | | }, |
| | | responseType: 'blob' |
| | | }).then((r) => { |
| | | const content = r.data |