Explorar el Código

卖家中心头部控制器增加toaster的引用

liusw hace 7 años
padre
commit
851b9d6b40

+ 2 - 2
src/main/webapp/resources/js/usercenter/app.js

@@ -713,7 +713,7 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'commo
     /**
      * 卖家中心头部
      */
-    app.controller('UserCenterHeaderCtrl', ['$scope', '$rootScope', 'BaseService', 'InternalMessage', '$http', function ($scope, $rootScope, BaseService, InternalMessage, $http) {
+    app.controller('UserCenterHeaderCtrl', ['$scope', '$rootScope', 'BaseService', 'InternalMessage', '$http', 'toaster', function ($scope, $rootScope, BaseService, InternalMessage, $http, toaster) {
         $scope.homeUrl = BaseService.getRootPath();
         InternalMessage.getUrl({}, function(data) {
             var url = data.url;
@@ -734,7 +734,7 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'commo
             }).success(function (data) {
             	console.info(data.count);
                 $rootScope.unReadMessCount = data.count;
-            }).error(function (response) {
+            }).error(function (err) {
                 toaster.pop('error', err || '获取未读消息数量失败');
             });
         });

+ 2 - 2
src/main/webapp/resources/js/vendor/app.js

@@ -954,7 +954,7 @@ define([ 'angularAMD', 'ngLocal', 'common/services', 'common/directives', 'commo
 	/**
 	 * 卖家中心头部
 	 */
-	app.controller('VendorCenterHeaderCtrl', ['$scope', '$rootScope', 'BaseService', 'InternalMessage', '$http',function ($scope, $rootScope, BaseService, InternalMessage, $http) {
+	app.controller('VendorCenterHeaderCtrl', ['$scope', '$rootScope', 'BaseService', 'InternalMessage', '$http', 'toaster', function ($scope, $rootScope, BaseService, InternalMessage, $http, toaster) {
 		$scope.homeUrl = BaseService.getRootPath();
         InternalMessage.getUrl({}, function(data) {
             var url = data.url;
@@ -975,7 +975,7 @@ define([ 'angularAMD', 'ngLocal', 'common/services', 'common/directives', 'commo
             }).success(function (data) {
             	console.info(data.count);
                 $rootScope.unReadMessCount = data.count;
-            }).error(function (response) {
+            }).error(function (err) {
                 toaster.pop('error', err || '获取未读消息数量失败');
             });
         });