From 2eddeb203548fa019096ec1a1db7d7c021f9c8f7 Mon Sep 17 00:00:00 2001 From: luchenqun Date: Fri, 12 Oct 2018 12:39:45 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=AC=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- database/db.js | 1 - routes/api.js | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/database/db.js b/database/db.js index 9baadde..4221773 100644 --- a/database/db.js +++ b/database/db.js @@ -1187,7 +1187,6 @@ db.getNote = function(id) { if (err) { reject(err); } else { - console.log(result[0].public); if(result.length > 0) { result[0].public == 1 ? resolve(result[0].content) : resolve("提示:备忘处于私密状态!"); } else { diff --git a/routes/api.js b/routes/api.js index a6c24a4..df6ad96 100644 --- a/routes/api.js +++ b/routes/api.js @@ -1233,10 +1233,9 @@ api.getFaviconByTimer = function() { if (bookmarks.length == 1) { var id = bookmarks[0].id; var faviconState = bookmarks[0].favicon_state; - var url = bookmarks[0].url; + var url = encodeURI(bookmarks[0].url); var faviconPath = './public/images/favicon/' + id + '.ico'; var defaultFile = './public/images/favicon/default.ico'; - console.log("getBookmarkWaitFavicon url:" + url); if (!/http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- .\/?%&=]*)?/.test(url)) { copyFile(defaultFile, faviconPath);