fix utils: remove params to close #1067 in request

This commit is contained in:
Baorong Li
2021-03-17 17:03:14 +08:00
parent d92f121cf4
commit 0e36b6b7a0
+2 -3
View File
@@ -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,