mirror of
				https://gitee.com/hhyykk/ipms-sjy-ui.git
				synced 2025-10-31 18:28:44 +08:00 
			
		
		
		
	request支持传递axios原生参数,例如超时:request(method:'GET',url:'',timeout:1000)
This commit is contained in:
		| @@ -5,12 +5,13 @@ import { config } from './config' | |||||||
| const { default_headers } = config | const { default_headers } = config | ||||||
|  |  | ||||||
| const request = (option: any) => { | const request = (option: any) => { | ||||||
|   const { url, method, params, data, headersType, responseType } = option |   const { url, method, params, data, headersType, responseType, ...config } = option | ||||||
|   return service({ |   return service({ | ||||||
|     url: url, |     url: url, | ||||||
|     method, |     method, | ||||||
|     params, |     params, | ||||||
|     data, |     data, | ||||||
|  |     ...config, | ||||||
|     responseType: responseType, |     responseType: responseType, | ||||||
|     headers: { |     headers: { | ||||||
|       'Content-Type': headersType || default_headers |       'Content-Type': headersType || default_headers | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 linr
					linr