From bdb9a931fc7445926a0ee97b05578416996755f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B05BEE13=2E=E5=8D=A2=E9=83=B4=E7=BE=A4?= Date: Mon, 26 Oct 2020 10:10:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=96=E6=B6=88=E5=8F=8C=E5=87=BB=E5=A4=8D?= =?UTF-8?q?=E5=88=B6=E5=A4=87=E5=BF=98=E5=86=85=E5=AE=B9=EF=BC=8C=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E4=B9=A6=E7=AD=BE=E5=A4=87=E5=BF=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controllers/bookmark-info-controller.js | 25 ------------------- www/views/bookmark-info.html | 9 +++---- www/views/note.html | 2 +- 3 files changed, 5 insertions(+), 31 deletions(-) diff --git a/www/scripts/controllers/bookmark-info-controller.js b/www/scripts/controllers/bookmark-info-controller.js index 5ec9f7d..8406efd 100644 --- a/www/scripts/controllers/bookmark-info-controller.js +++ b/www/scripts/controllers/bookmark-info-controller.js @@ -12,31 +12,6 @@ app.controller('bookmarkInfoCtr', ['$scope', '$state', '$timeout', '$sce', '$win bookmark.favicon_url = 'https://favicon.lucq.fun/?url=' + bookmark.url; $scope.bookmark = bookmark; $scope.bookmark.description = $sce.trustAsHtml(bookmark.description); - $scope.content = $sce.trustAsHtml(bookmark.content) || ''; - if (!$scope.content) { - $timeout(function () { - $('.ui.modal.js-bookmark-info').modal("refresh"); - $("p").css("word-wrap", "break-word"); - }, 500); - $scope.loading = true; - try { - let data = get("article", { url: bookmark.url }); - $scope.content = data.content ? $sce.trustAsHtml(data.content) : $sce.trustAsHtml('

数据获取失败,可能是服务器不允许获取,或者是https网站!

'); - setTimeout(function () { - $('.ui.modal.js-bookmark-info').modal && $('.ui.modal.js-bookmark-info').modal("refresh"); - }, 100); - } catch (error) { - - } - $scope.loading = false; - } else { - setTimeout(function () { - $('.ui.modal.js-bookmark-info').modal && $('.ui.modal.js-bookmark-info').modal("refresh"); - }, 10); - setTimeout(function () { - $('.modals').animate({ scrollTop: 0 }, 100); - }, 500); - } }); $scope.jumpToUrl = async function (url, id) { diff --git a/www/views/bookmark-info.html b/www/views/bookmark-info.html index 7f6ab9c..19bd42c 100644 --- a/www/views/bookmark-info.html +++ b/www/views/bookmark-info.html @@ -40,11 +40,10 @@ -
-
-
-

- +
+
+
+
{{ bookmark.description }}
diff --git a/www/views/note.html b/www/views/note.html index 6b40b8f..08138c2 100644 --- a/www/views/note.html +++ b/www/views/note.html @@ -33,7 +33,7 @@
{{ note.brief }}
-
{{ note.content }}
+
{{ note.content }}