parent
cdc2e3409a
commit
a5f1a5c2fd
@ -503,7 +503,7 @@ const request = (function(_global) {
|
||||
const { accessToken = '', username = '' } = token;
|
||||
const [url, paramsStr = ''] = config.url.split('?');
|
||||
const params = paramsStr.split('&');
|
||||
params.push(`accessToken=${accessToken}&username=${username}`);
|
||||
params.push(`accessToken=${accessToken}`);
|
||||
|
||||
return $.ajax(
|
||||
Object.assign({}, config, {
|
||||
|
@ -49,7 +49,10 @@ const request = () => {
|
||||
}
|
||||
const { accessToken = '', username = '' } = token;
|
||||
config.params.accessToken = accessToken;
|
||||
config.params.username = username;
|
||||
// support #3548 and fix #5835
|
||||
if (!url.includes('auth')) {
|
||||
config.params.username = username;
|
||||
}
|
||||
config.headers = Object.assign({}, headers, { accessToken });
|
||||
}
|
||||
if (data && isPlainObject(data) && ['post', 'put'].includes(method)) {
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user