This commit is contained in:
2026-04-10 15:53:15 +08:00
parent 0a56b16fe4
commit d613aa7d0d
10 changed files with 796 additions and 139 deletions

View File

@@ -102,6 +102,22 @@ export default {
})
},
/**
* POST x-www-form-urlencoded数组字段序列化为 list[]=a&list[]=b兼容 PHP 批量接口)
*/
postFormBracket(url, params) {
return new Promise((resolve, reject) => {
service
.post(url, qs.stringify(params, { arrayFormat: 'brackets' }))
.then((res) => {
resolve(res.data)
})
.catch((err) => {
reject(err)
})
})
},
/**
* post方法对应post请求
* @param {String} url [请求的url地址]