Browse Source

处理 http://uas.ubtob.com/public/notice异常问题

hejq 7 years ago
parent
commit
79e0d3a4eb

+ 4 - 2
src/main/webapp/resources/js/common/services.js

@@ -250,10 +250,12 @@ define(['angular', 'toaster', 'big'], function(angular, big) {
                 });
             },
             setNoticeStatusAfterRead: function (id, useruu, success) {
-                var request = $http.post(rootPath + '/public/notice/setReadStatus?id=' + id + '&useruu=' + useruu);
-                request.success(function() {
+                var url = rootPath + '/public/notice/setReadStatus?id=' + id + '&useruu=' + useruu;
+                $http({method: 'post', url: url, headers:{'Content-Type': 'application/json'},
+                }).success(function () {
                     success.call(null);
                 });
+
             }
         };
     }]).factory('SerializerUtil', function() {

+ 1 - 1
src/main/webapp/resources/js/public/app.js

@@ -20,7 +20,7 @@ define([ 'toaster', 'ngTable', 'common/services', 'service/Info', 'ui.router', '
 			controller: 'ServeCtrl'
 		});
 	}]);
-	app.controller('NoticeCtrl', ['$scope', 'ngTableParams', 'Notice', 'BaseService', 'AuthenticationService', function($scope, ngTableParams, Notice, BaseService, AuthenticationService){
+	app.controller('NoticeCtrl', ['$scope', 'ngTableParams', 'Notice', 'BaseService', 'AuthenticationService', 'SnapshotService', function($scope, ngTableParams, Notice, BaseService, AuthenticationService, SnapshotService) {
 		$scope.tableParams = new ngTableParams({
 			page : 1,
 			count : 20,