123456789101112131415161718192021222324252627282930313233343536373839 |
- app.controller('StdExamNoticeCtrl', function($rootScope, $scope, $http, $timeout, $state, $window, myConfig, Upload, toaster, $q) {
- $scope.load = function(){
- $scope.examNoticeConfirm = {};
- $scope.myPromise = $http({
- url : $rootScope.host_url + '/acquire/getExamNoticeConfirm?session=' + $rootScope.session,
- method : 'GET'
- }).success(function(data) {
- if(data.code == 0){
- $scope.examNoticeConfirm = data.result;
- if($scope.examNoticeConfirm.confirm_time){
- $scope.checkStatus = true;
- $rootScope.stdExamNoticeConfirmed = true;
- }else{
- $scope.checkStatus = false;
- }
- }
- }).error(function() {
- });
- }
- $scope.load();
-
- $scope.submitConfirm = function(){
- if($scope.checkStatus){
- $scope.myPromise = $http({
- url : $rootScope.host_url + '/acquire/postExamNoticeConfirm?session=' + $rootScope.session,
- method : 'POST'
- }).success(function(data) {
- if(data.code != 0){
- toaster.pop('error', data.message);
- }
- $scope.load();
- }).error(function() {
- });
- }else{
- $rootScope.dialogMsg("请仔细阅读后勾选已阅读。", function(){});
- }
- }
-
- });
|