Skip to content

Commit

Permalink
fix: 🔧 修复 uni-network 格式化参数的行为与 axios不一致的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
viarotel committed Sep 9, 2023
1 parent 95f733e commit 00af3bf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/utils/request/uni-network/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ export default ({
},
timeout,
xsrfHeaderName: 'token',
paramsSerializer: (params) => {
return Object.prototype.toString.call(params).includes('URLSearchParams')
? params.toString()
: qs.stringify(params)
},
})

// 请求拦截
Expand Down

0 comments on commit 00af3bf

Please sign in to comment.