From 093c6591826c2f65a5dd8f4226208238e5b4dea4 Mon Sep 17 00:00:00 2001 From: luchenqun Date: Fri, 3 Feb 2017 17:40:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=8E=E6=A0=87=E7=AD=BE=E5=88=86=E7=B1=BB?= =?UTF-8?q?=E8=BF=9B=E5=85=A5=EF=BC=8C=E6=88=91=E4=BC=9A=E6=BF=80=E6=B4=BB?= =?UTF-8?q?=E6=A0=87=E7=AD=BE=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/scripts/controllers/tags-controller.js | 8 ++++++-- public/views/tags.html | 2 +- routes/api.js | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/public/scripts/controllers/tags-controller.js b/public/scripts/controllers/tags-controller.js index 4379751..7f690e7 100644 --- a/public/scripts/controllers/tags-controller.js +++ b/public/scripts/controllers/tags-controller.js @@ -18,9 +18,8 @@ app.controller('tagsCtr', ['$scope', '$filter', '$window', 'bookmarkService', 'p }); $scope.getBookmarks = function(tagId, currentPage) { - console.log('tags getBookmarks', tagId); $scope.bookmarkClicked = true; - $scope.currentTagId = tagId; + $scope.currentTagId = tagId; $scope.tags.forEach(function(tag) { tag.bookmarkClicked = false; @@ -91,5 +90,10 @@ app.controller('tagsCtr', ['$scope', '$filter', '$window', 'bookmarkService', 'p bookmarkService.getTags(params) .then((data) => $scope.tags = data) .catch((err) => console.log('getTags err', err)); + + pubSubService.publish('Common.menuActive', { + login: true, + index: 1 + }); } }]); diff --git a/public/views/tags.html b/public/views/tags.html index 0e1b291..da04313 100644 --- a/public/views/tags.html +++ b/public/views/tags.html @@ -3,7 +3,7 @@
- {{ tag.name }} x {{ tag.cnt }} + {{ tag.name }} ({{ tag.cnt }})
diff --git a/routes/api.js b/routes/api.js index aac5b6a..aff76df 100644 --- a/routes/api.js +++ b/routes/api.js @@ -265,7 +265,7 @@ api.get('/bookmarksByTag', function(req, res) { }) sendData.totalItems = totalItems; sendData.bookmarks = data; - + res.json(sendData); }) .catch((err) => console.log('bookmarks table or card err', err))