mirror of
https://github.com/zuiidea/antd-admin
synced 2026-10-30 05:13:43 +00:00
fix utils: remove params to close #1067 in request
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import axios from 'axios'
|
||||
import { cloneDeep, isEmpty } from 'lodash'
|
||||
import { cloneDeep } from 'lodash'
|
||||
const { parse, compile } = require("path-to-regexp")
|
||||
import { message } from 'antd'
|
||||
import { CANCEL_REQUEST_MESSAGE } from 'utils/constant'
|
||||
@@ -8,7 +8,7 @@ const { CancelToken } = axios
|
||||
window.cancelRequest = new Map()
|
||||
|
||||
export default function request(options) {
|
||||
let { data, url, method = 'get' } = options
|
||||
let { data, url } = options
|
||||
const cloneData = cloneDeep(data)
|
||||
|
||||
try {
|
||||
@@ -33,7 +33,6 @@ export default function request(options) {
|
||||
}
|
||||
|
||||
options.url = url
|
||||
options.params = cloneData
|
||||
options.cancelToken = new CancelToken(cancel => {
|
||||
window.cancelRequest.set(Symbol(Date.now()), {
|
||||
pathname: window.location.pathname,
|
||||
|
||||
Reference in New Issue
Block a user