发表于: 2017-01-05 00:43:12

1 1636


今日完成:

1完成了一个PPT,主要内容是讲什么是微格式,微格式的作用及意义。

2完成了任务7的使用http登录跳转页面。

$scope.aPostData = function () {
$http({
method:'POST',
url:"a/login",
data: $.param({
mobile:$scope.sdata.mobile,
pwd:$scope.sdata.pwd
}

),
headers:{'Content-Type':'application/x-www-form-urlencoded'}
}).success(function (res) {
if(res.code ==0){
console.log(res);
$state.go('list1');
//     alert("测试");
    }
else if (res.code ==-1000){
alert("参数不能为空");
}
else if (res.code ==-2006){
alert("密码错误 ");
}

}).error(function (res) {
alert("跨域未配置,无法连接服务器")
});
};

明日计划:

完成任务7的获取数据,并渲染到表格里

遇到的问题:

1 controller:"login "多了一个空格报了一个错误

还有这两个顺序要一致,不一致会导致程序运行部了,

3.使用http获取数据时,报了这个错,不知道是怎么回事

今日收获:

对angular更加熟悉了,知道了一些坑。



返回列表 返回列表
评论

    分享到