$http({ //发送请求
url: 'http://localhost:8080/teacher/api/login',
method: 'post',
data: obj
})
.success(function(data) {
$rootScope.data = data; //返回结果
var teacherInfo = encodeURIComponent(JSON.stringify(data.teacherInfo));
cookieSev.setCookie('teacherInfo', teacherInfo, 48 * 60 * 60 * 1000);
$scope.$state.go('courseMessage.List', { //跳转
pageIndex: 1
});
})
.error(function(data) {
alert(data.msg);
});