更新时间:2022-10-28 15:22:58
$scope.RealTimeUpdate = function (obj) {
var thisRurl = '/MFreeXFapi/student/RealTimeUpdate';
var rturl = $(obj).attr('rthref');
$http({
method: 'POST',
url: thisRurl,
transformRequest: $.param,
headers: { 'Content-Type': 'application/x-www-form-urlencoded;' },
data: 'ProductId=' + $rootScope.paycourseId + '&studentid=' + $scope.userData.rowId + '&orderid=' + $scope.payood,
}).success(function (data) {
if (data != true) {
$scope.orderError = true;
console.log($scope.orderError)
} else {
window.location.href = rturl
}
})
};
jq的ajax不会触发ng的检查机制 需要使用$http代替 或者改变model后使用$scope.$apply