Browse Source

买卖家中心未读消息取值修改

liusw 7 years ago
parent
commit
f99f06b08e

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

@@ -715,7 +715,6 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'commo
      */
     app.controller('UserCenterHeaderCtrl', ['$scope', '$rootScope', 'BaseService', 'InternalMessage', '$http', function ($scope, $rootScope, BaseService, InternalMessage, $http) {
         $scope.homeUrl = BaseService.getRootPath();
-        console.info($rootScope.userInfo);
         InternalMessage.getUrl({}, function(data) {
             var url = data.url;
             if (url == "http://218.17.158.219:24000/message") {
@@ -733,7 +732,8 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'commo
                 url: url + '/messages/count',
                 params: param
             }).success(function (data) {
-                $rootScope.unReadMessCount = data.toRead;
+            	console.info(data.count);
+                $rootScope.unReadMessCount = data.count;
             }).error(function (response) {
                 toaster.pop('error', err || '获取未读消息数量失败');
             });

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

@@ -956,7 +956,6 @@ define([ 'angularAMD', 'ngLocal', 'common/services', 'common/directives', 'commo
 	 */
 	app.controller('VendorCenterHeaderCtrl', ['$scope', '$rootScope', 'BaseService', 'InternalMessage', '$http',function ($scope, $rootScope, BaseService, InternalMessage, $http) {
 		$scope.homeUrl = BaseService.getRootPath();
-		console.info($rootScope.userInfo);
         InternalMessage.getUrl({}, function(data) {
             var url = data.url;
             if (url == "http://218.17.158.219:24000/message") {
@@ -974,7 +973,8 @@ define([ 'angularAMD', 'ngLocal', 'common/services', 'common/directives', 'commo
                 url: url + '/messages/count',
                 params: param
             }).success(function (data) {
-                $rootScope.unReadMessCount = data.toRead;
+            	console.info(data.count);
+                $rootScope.unReadMessCount = data.count;
             }).error(function (response) {
                 toaster.pop('error', err || '获取未读消息数量失败');
             });