This commit is contained in:
qsh
2024-07-22 20:07:53 +08:00
parent 8142e05543
commit 9dada27bd0
6 changed files with 132 additions and 80 deletions

View File

@@ -79,7 +79,7 @@ service.interceptors.request.use(
config.data = qs.stringify(data)
}
// get参数编码
if (config.method?.toUpperCase() === 'GET' && params) {
if (config.method?.toUpperCase() === 'GET' && Object.keys(params).length > 0) {
config.params = {}
const paramsStr = qs.stringify(params, { allowDots: true })
if (paramsStr) {