const sns = [1, 2, 3]; // 示例数组
// 构造查询参数
const params = sns.map((value, index) => `sns[${index}]=${value}`).join('&');
const url = `/xxxx?${params}`;
前端post请求,url上传递数组
最新推荐文章于 2024-07-14 18:10:31 发布
const sns = [1, 2, 3]; // 示例数组
// 构造查询参数
const params = sns.map((value, index) => `sns[${index}]=${value}`).join('&');
const url = `/xxxx?${params}`;