in accordance with this requirement:
localhost/goods?ids[]=1&ids[]=2
the axios code is as follows:
var array = [1, 2];
let json = JSON.stringify(array);
console.log(json);
axios.get("http://localhost/goods", json).then(function (res) {
if (res.code == 200) {
console.log("ok");
}
}
the above code seems to be incorrect. How can I use axios to implement this URL request method?