The interface has three input parameters. One of them is an array. How to transfer using angular
给我你的怀抱2017-05-15 17:14:12
You can directly pass the object as a parameter to the $http object
$http({
method: 'POST',
url: 'XXX',
data: {
'param1':a,
'param2':b,
'param3':[]
}
}).then(function(res)
{
})
淡淡烟草味2017-05-15 17:14:12
What kind of interface needs to pass arrays as parameters?
I don’t understand.
I think one of the responsibilities of the front-end is: if the interface provided by the back-end interface is unreasonable, it should be raised and appropriate adjustments should be made.
黄舟2017-05-15 17:14:12
Forcibly convert the string and then convert it back, or simply use your own rules to mark the array with XX, such as ("_") splitting and splicing into strings, and then parsing according to the rules