-
Notifications
You must be signed in to change notification settings - Fork 7.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: 请求传入数组的时候,会有[]出现导致请求出错 #5320
Labels
Comments
get请求吗,get请求默认不能使用array,需要特殊处理,或者跟后端约定好直接传字符串 |
delete请求,只不过是拼接字符串,我看有个参数 :paramsSerializer 这里应该怎么配置呢 |
这个估计要看axios的文档怎么说了,我们在项目中这种比较复杂的参数一般选择在body里面传递,而不是通过?来传 |
我搜索到可以使用qs来格式化,两种都行 |
/**
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Version
Vben Admin V5
Describe the bug?
接口如下,调用的时候会追加上[]导致请求异常。
`/**
*/
export async function deleteRoleUserApi(ids: string[]) {
return requestClient.delete('/role/delete-user', { params: { ids } });
}
`
Reproduction
`/**
*/
export async function deleteRoleUserApi(ids: string[]) {
return requestClient.delete('/role/delete-user', { params: { ids } });
}
`
System Info
Relevant log output
No response
Validations
The text was updated successfully, but these errors were encountered: