請求URL:http://10.24.120.110/mirrortin2/api/public/2ndlayer/search/[object%20Object],[object%20Object]/brandname/barcode/gender/producttype/productname
請求方法:POST
狀態代碼:200 OK
我有我的網絡上的這個錯誤,有人可以幫我這個
這是我的功能
要求[對象%20Object]
$scope.sid="scpid";
$scope.sid = [{todoText:'Clean House', done:false}];
$scope.todoAdd = function() {
var todoInput ="";
$scope.sid.push({todoText:$scope.todoInput, done:false});
$scope.todoInput = "";
console.log(todoInput);
};
$scope.remove = function() {
var oldList = $scope.sid;
$scope.sid = [];
angular.forEach(oldList, function(x) {
if (!x.done) $scope.sid.push(x);
});
};
我服務
function filter2ndSearch(sid, bname, bcode, gnder, ptype, pname, size_oz, size_ml, size_g, size_pcs){
return $http({
method: 'post',
url: rootURL + '/2ndlayer/search/' + sid + '/' + bname + '/' + bcode + '/' + gnder + '/' + ptype + '/' + pname ,
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
});
}
'sid'和'bname'都是對象。您需要將它們串行化,而不是連接它們。 –
200 OK表示一切都很好,正在運行,問題是什麼? –
嗨@rory我應該修改哪些代碼? –