|
|
@@ -713,9 +713,8 @@ 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();
|
|
|
- console.info($rootScope.userInfo);
|
|
|
InternalMessage.getUrl({}, function(data) {
|
|
|
var url = data.url;
|
|
|
if (url == "http://218.17.158.219:24000/message") {
|
|
|
@@ -733,8 +732,9 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'commo
|
|
|
url: url + '/messages/count',
|
|
|
params: param
|
|
|
}).success(function (data) {
|
|
|
- $rootScope.unReadMessCount = data.toRead;
|
|
|
- }).error(function (response) {
|
|
|
+ console.info(data.count);
|
|
|
+ $rootScope.unReadMessCount = data.count;
|
|
|
+ }).error(function (err) {
|
|
|
toaster.pop('error', err || '获取未读消息数量失败');
|
|
|
});
|
|
|
});
|