| | |
| | | url: string |
| | | authorization: boolean |
| | | }) => { |
| | | if(config.url.includes('h5')) { |
| | | config.url = '/drone-h5' + config.url |
| | | } else if (!config.url.includes('/blade-') && !config.url.includes('https://') && !config.url.includes('http://')) { |
| | | config.url = '/drone-yw' + config.url |
| | | if (!config.url.includes('/blade-') && !config.url.includes('https://') && !config.url.includes('http://')) { |
| | | config.url = '/drone-device-core' + config.url |
| | | } |
| | | const authorization = config.authorization === false |
| | | if (!authorization) { |
| | |
| | | const isToken = meta.isToken === false |
| | | if (getToken() && !isToken) { |
| | | config.headers[website.tokenHeader] = 'bearer ' + getToken() |
| | | } else { |
| | | // 为了兼容分享页面 |
| | | config.headers[website.tokenHeader] = 'bearer ' + getAuthToken() |
| | | } |
| | | if (meta.noCookie) { |
| | | delete config.headers.cookie |