1
This commit is contained in:
@ -23,12 +23,13 @@ const requestGo: RequestGo = (config: any) => {
|
||||
});
|
||||
};
|
||||
|
||||
requestGo.download = function (url: string, params: any, filename: string) {
|
||||
requestGo.download = function (url: string, params: any, filename: string, method: 'post' | 'get' = 'post') {
|
||||
return request({
|
||||
url,
|
||||
method: 'post',
|
||||
method: method,
|
||||
baseURL: BASE_GO_URL,
|
||||
data: params,
|
||||
data: method === 'post' ? params : undefined,
|
||||
params: method === 'get' ? params : undefined,
|
||||
headers: {
|
||||
'Authorization': `Bearer ${$cache.local.get('goToken') || ''}`
|
||||
},
|
||||
|
Reference in New Issue
Block a user