const params = {
userIds: data.map((i) => { return i.id }) || []
}
// userIds=1567764651561848832&userIds=1579673013917933569
console.log(qs.stringify(params, { arrayFormat: 'repeat' }))
axios.get(`url/${this.message.id}`, {
params,
paramsSerializer: params => {
return qs.stringify(params, { arrayFormat: 'repeat' })
}
}).then((res) => {
if (res && res.errCode) {
this.$message.error(res.message)
} else {
this.$message.success('邀请成功')
}
}, error => {
this.$message.error(error)
})
axios.get-数组传参
最新推荐文章于 2023-10-17 11:52:28 发布