From c6ba5b50f5ecae71b3703b7d57e5b0d7ee09d0e1 Mon Sep 17 00:00:00 2001 From: aqu415 Date: Sat, 26 Mar 2022 12:15:53 +0800 Subject: [PATCH] =?UTF-8?q?=E9=93=BE=E6=8E=A5=E5=A4=8D=E5=88=B6=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/html/list.html | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/static/html/list.html b/static/html/list.html index 83ea614..d9452dc 100644 --- a/static/html/list.html +++ b/static/html/list.html @@ -71,7 +71,7 @@ ${item.update_time} 编辑 - 复制分享 + 复制分享 删除 ` @@ -251,6 +251,20 @@ function delmind(id) { view.del_mind(id) } + + // 复制链接 + function copy_url(id) { + let href = location.href + `detail?id=${id}`; + console.log(href) + navigator.clipboard.writeText(href) + .then(() => { + // Success! + layer.msg('复制成功') + }) + .catch(err => { + console.log('Something went wrong', err); + }); + }