flat: 添加router
This commit is contained in:
@@ -34,6 +34,9 @@ axios.interceptors.request.use(config => {
|
||||
NProgress.start();
|
||||
const meta = (config.meta || {});
|
||||
const isToken = meta.isToken === false;
|
||||
if (config.url.startsWith('/api') && process.env.NODE_ENV !== 'development') {
|
||||
config.url = config.url.replace(/^\/api/, '/api/gt');
|
||||
}
|
||||
config.headers['Authorization'] =
|
||||
`Basic ${Base64.encode(`${website.clientId}:${website.clientSecret}`)}`;
|
||||
if (getToken() && !isToken) {
|
||||
|
||||
Reference in New Issue
Block a user