解决办法: 1.设置一下default head 2.参数转换一下data:$.param({orderNo: orderNo,sessionId:sessionId}) $http.defaults.headers.post["Content-Type"] = "application/x-www-form-urlencoded"; $scope.afterSales = [] var sessionId = getSesssionId(); // after sales $http({ method: "POST", url: "/metronic/api/getAfterSales", data:$.param({orderNo: orderNo,sessionId:sessionId}), async: false, dataType:‘json‘ }).success(function(data, status) { $scope.afterSales = data; }).error(function(data, status) { });
时间: 2024-10-10 22:00:44