|
|
@@ -373,20 +373,22 @@ define(['app/app'], function(app) {
|
|
|
// $rootScope.unReadMessCount = data.totalElements;
|
|
|
} else {
|
|
|
var param = {
|
|
|
- page: 1,
|
|
|
- count: 10,
|
|
|
- timeSorting: 'DESC',
|
|
|
- classes: '',
|
|
|
- recRole: 'SELLER',
|
|
|
+ 'receiverUu': info.userUU,
|
|
|
+ 'receiverEnuu': info.enUU,
|
|
|
+ 'consumerApp': 'MALL',
|
|
|
'isRead': 0
|
|
|
};
|
|
|
- InternalMessage.getUrl({}, function(data) {
|
|
|
- /*InternalMessage.getUnread({isRead: 0}, function (data) {*/
|
|
|
- InternalMessage.getUnread({isRead: 0}, function (data) {
|
|
|
- $rootScope.unReadMessCount = data.toRead;
|
|
|
- $scope.unReadMessCount = data.toRead;
|
|
|
- })
|
|
|
- })
|
|
|
+ $http({
|
|
|
+ method: 'get',
|
|
|
+ dataType: 'json',
|
|
|
+ url: url + '/messages/count',
|
|
|
+ params: param
|
|
|
+ }).success(function (data) {
|
|
|
+ $rootScope.unReadMessCount = data.count;
|
|
|
+
|
|
|
+ }).error(function (err) {
|
|
|
+ toaster.pop('error', err || '获取未读消息数量失败');
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
}, function(response) {
|