码迷,mamicode.com
首页 > Web开发 > 详细

angularjs,$http(post)

时间:2018-07-25 18:17:23      阅读:154      评论:0      收藏:0      [点我收藏+]

标签:代码   The   http   ica   scrolltop   信息   move   pre   else   

$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, "出错了!");
        }

    })

angularjs,$http(post)

标签:代码   The   http   ica   scrolltop   信息   move   pre   else   

原文地址:http://blog.51cto.com/zhaoyingyatou/2150136

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!