首页 > Web开发 > 详细

angularjs,$http(post)

时间:2018-07-25 18:14:22      阅读:151      评论:0      收藏:0      [点我收藏+]
$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)

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!