{"size": 1049, "ext": "js", "max_stars_repo_path": "www/teacherPage/js/SWork.js", "max_stars_repo_name": "NchuTing/primary", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "www/teacherPage/js/SWork.js", "max_issues_repo_name": "NchuTing/primary", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "www/teacherPage/js/SWork.js", "max_forks_repo_name": "NchuTing/primary", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 26.8974358974, "max_line_length": 66, "alphanum_fraction": 0.5519542421}
app.controller('datacontroller', function ($scope, $rootScope) {
	$.post('/../../start/api/getMyInfo', function (res) {
		$rootScope.userid = res.data['id'];
		var str = window.location.search;
		var dat = {
			wid: str.substring(5),
			userid: $rootScope.userid
		}
		console.log(">>>dat", dat)
		$.get('/homework/api/kuWorkDetail', dat, function (res) {

			res.data[0].creatdate = res.data[0].creatdate.substring(0, 10);
			res.data[0].enddate = res.data[0].enddate.substring(0, 10);
			console.log(">>>>>>作业", res.data[0]);
			if (res.data[0].annex == '.....' || res.data[0].annex == '') {
				$('#annex').css({
					display: 'none'
				})
			}
			$scope.$apply(function () {
				$scope.workinfo = res.data[0];
			})
			$.get('/homework/api/SWorkDetail', dat, function (res) {
				console.log(">>>>41", res.data);
				if (res.data.answer !== null) {
					$("#up").html('已提交');
				}
				if (res.data.score !== null) {
					$("#check").html('已批改');
				}
				$scope.$apply(function () {
					$scope.sworkinfo = res.data
				})
			})
		})
	})

})
