From 823e1625b0b9057dfae0beab0e5f4872ade4afcf Mon Sep 17 00:00:00 2001 From: HelloWorld Date: Wed, 22 Apr 2020 15:14:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=90=9C=E7=B4=A2=E4=B9=A6=E7=AD=BEbug?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- www/scripts/controllers/note-controller.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/www/scripts/controllers/note-controller.js b/www/scripts/controllers/note-controller.js index b965235..ad0fb6e 100644 --- a/www/scripts/controllers/note-controller.js +++ b/www/scripts/controllers/note-controller.js @@ -305,11 +305,15 @@ app.controller('noteCtr', ['$scope', '$state', '$stateParams', '$filter', '$wind $scope.loading = true; var params = { page: $scope.currentPage, - pageSize: 35, - keyword: $scope.keyword, - tagId: tagId || $scope.currentTagId + pageSize: 35 }; + if (tagId || $scope.currentTagId) { + params.tagId = tagId || $scope.currentTagId; + } else if ($scope.keyword) { + params.keyword = $scope.keyword; + } + let reply = await get("notes", params); $timeout(function () { let notes = reply.data;