|
|
@ -325,6 +325,47 @@ app.controller('ClassController', ['$scope', 'config','$http', 'auth','$location
|
|
|
|
rms.save("course",vm.course);
|
|
|
|
rms.save("course",vm.course);
|
|
|
|
// $location.path('/'+type+'/'+act_id);
|
|
|
|
// $location.path('/'+type+'/'+act_id);
|
|
|
|
$location.path("/homework").search({id: id});
|
|
|
|
$location.path("/homework").search({id: id});
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vm.deleteMember = function(user_id){
|
|
|
|
|
|
|
|
$http({
|
|
|
|
|
|
|
|
method: 'POST',
|
|
|
|
|
|
|
|
url: apiUrl + "courses/deletemember?id=" + courseid,
|
|
|
|
|
|
|
|
data:{token:auth.token(),user_id:user_id}
|
|
|
|
|
|
|
|
}).then(function successCallback(response) {
|
|
|
|
|
|
|
|
console.log(response.data);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(response.data.status == 0){
|
|
|
|
|
|
|
|
vm.alertService.showMessage('提示', response.data.message,function(){
|
|
|
|
|
|
|
|
//确定
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else{
|
|
|
|
|
|
|
|
vm.alertService.showMessage('提示', response.data.message);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vm.quit = function(){
|
|
|
|
|
|
|
|
$http({
|
|
|
|
|
|
|
|
method: 'POST',
|
|
|
|
|
|
|
|
url: apiUrl + "courses/quit?id=" + courseid,
|
|
|
|
|
|
|
|
data:{token:auth.token()}
|
|
|
|
|
|
|
|
}).then(function successCallback(response) {
|
|
|
|
|
|
|
|
console.log(response.data);
|
|
|
|
|
|
|
|
if(response.data.status == 0){
|
|
|
|
|
|
|
|
vm.alertService.showMessage('提示', response.data.message,function(){
|
|
|
|
|
|
|
|
//确定
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else{
|
|
|
|
|
|
|
|
vm.alertService.showMessage('提示', response.data.message);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}]);
|
|
|
|
}]);
|