angularjs,$http(post)

$http(post)
$http({
method: 'post',
url: '/BSWQI/start_Cal',
dataType: "json",
contentType: "application/json",
data: { app_key: "111", lstData: $scope.relist },
}).then(function successCallback(res) {
// 請求成功執行代碼
var result = res.data;
if (result.status == 200) {
var map = new Map();

            $("[classname]").each(function (i) {
                $(this).removeAttr("class");
                if ($(this).attr("classname") == map.get(result.data)) {
                    $(this).attr("class", map.get(result.data));
                }
            });
            $(document).scrollTop($(document).height());//滾動到最下方
            toastr.success('評估成功!', '提示信息!');
        }
        else {
            toastr.error(result.msg, "出錯了!");
        }

    })
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章