From 6c4dc01f36ced8a1a3a9e1d892be3536cf328501 Mon Sep 17 00:00:00 2001 From: HelloWorld Date: Wed, 8 Apr 2020 08:48:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E4=B9=A6=E7=AD=BE=E5=88=86?= =?UTF-8?q?=E7=B1=BB=E9=A1=B5=E9=9D=A2=E7=9A=84=E9=A2=84=E5=8A=A0=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- www/scripts/controllers/tags-controller.js | 8 +++----- www/views/tags.html | 4 ++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/www/scripts/controllers/tags-controller.js b/www/scripts/controllers/tags-controller.js index 40825ad..3d36b1d 100644 --- a/www/scripts/controllers/tags-controller.js +++ b/www/scripts/controllers/tags-controller.js @@ -13,8 +13,7 @@ app.controller('tagsCtr', ['$scope', '$filter', '$state', '$window', '$statePara var addBookmarkId = -1; $scope.hoverBookmark = null; $scope.showType = "createdAt"; - $scope.loading = false; - $scope.loadTags = false; + $scope.loading = true; $scope.tags = []; // 书签数据 $scope.tagsIndex = []; // 书签索引 $scope.bookmarks = []; @@ -344,7 +343,7 @@ app.controller('tagsCtr', ['$scope', '$filter', '$state', '$window', '$statePara async function updateTags(_tags) { let tags = JSON.parse(JSON.stringify(_tags)); - $scope.loadTags = true; + $scope.loading = true; $scope.tags = []; tags.unshift({ @@ -370,13 +369,13 @@ app.controller('tagsCtr', ['$scope', '$filter', '$state', '$window', '$statePara tags[0].bookmarkClicked = true; } - $scope.loadTags = false; pubSubService.publish('Common.menuActive', { login: true, index: dataService.LoginIndexTags }); $timeout(() => { + $scope.loading = false; $scope.tags = tags; if (!$scope.editMode) { $scope.getBookmarks(null, null, null); @@ -427,7 +426,6 @@ app.controller('tagsCtr', ['$scope', '$filter', '$state', '$window', '$statePara pubSubService.subscribe('EditCtr.addTagsSuccess', $scope, function (event, data) { console.log('subscribe EditCtr.addTagsSuccess', data); - var menusScope = $('div[ng-controller="menuCtr"]').scope(); if (menusScope.login && menusScope.selectLoginIndex == 1) { getTags(); diff --git a/www/views/tags.html b/www/views/tags.html index 0d907ec..59a8ca4 100644 --- a/www/views/tags.html +++ b/www/views/tags.html @@ -1,4 +1,4 @@ -
+
{{ tag.name }} ({{ tag.bookmarkCount || 0 }}) @@ -50,7 +50,7 @@
-
+
正在加载中...