Browse Source

消息通知弹出框

hejq 7 years ago
parent
commit
a3d60f5550

+ 15 - 1
src/main/webapp/resources/js/index/app.js

@@ -1540,7 +1540,8 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
         };
     }]);
 
-    app.controller('TodoCtrl', ['$scope', 'SnapshotService', 'BaseService', '$rootScope', function ($scope, SnapshotService, BaseService, $rootScope) {
+    app.controller('TodoCtrl', ['$scope', 'SnapshotService', 'BaseService', '$rootScope', '$modal',
+        function ($scope, SnapshotService, BaseService, $rootScope, $modal) {
         BaseService.scrollBackToTop();
         SnapshotService.getTodo(function (data) {
             $scope.todo = data;
@@ -1576,6 +1577,19 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
             $rootScope.tenderActive = active;
             window.location.hash = '#/purc/tender';
         }
+            $modal.open({
+                templateUrl: 'static/tpl/index/home/modal/notice.html',
+                controller: 'NotifyCtrl',
+                size: 'lg'
+            }).result.then(function (s) {
+            });
+    }]);
+
+    app.controller('NotifyCtrl', ['$scope', '$modalInstance',
+        function($scope, $modalInstance) {
+        $scope.close = function() {
+            $modalInstance.close();
+        }
     }]);
     // header
     app.controller('HeaderCtrl', ['$scope', 'SnapshotService', function ($scope, SnapshotService) {

+ 3 - 0
src/main/webapp/resources/tpl/index/home/modal/notice.html

@@ -0,0 +1,3 @@
+<div class="modal-header">消息通知<a ng-click="close()">X</a></div>
+<div class="modal-body">通知内容</div>
+<div class="modal-footer"><a class="btn btn-danger" ng-click="close()">关闭</a></div>