From 324e880056bf592b3e5a4bbe5a4a19719f57cafb Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Fri, 29 Nov 2019 15:03:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=B9=B3=E5=8F=B0->=E6=B8=B8?= =?UTF-8?q?=E6=88=8F=E7=AE=A1=E7=90=86--=E8=87=AA=E5=8A=A8=E5=A4=8D?= =?UTF-8?q?=E5=88=B6=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/View/default/Apply/my_game.html | 24 ++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/Application/Home/View/default/Apply/my_game.html b/Application/Home/View/default/Apply/my_game.html index 33dff8572..993edaaef 100644 --- a/Application/Home/View/default/Apply/my_game.html +++ b/Application/Home/View/default/Apply/my_game.html @@ -11,6 +11,14 @@ .btn-role-border { border-left: 0; } + .clipboard-btn { + width: 60px; + height: 28px; + border: 0; + border-radius: 3px; + color: #fff; + background-color: #3A97FF; + } @@ -260,13 +268,13 @@
-
- 复制成功,ctrl+v粘贴即可 + 复制成功,ctrl+v粘贴即可 +
@@ -887,12 +895,22 @@ }); }); - new ClipboardJS('#clipboard-btn', { + var clipboard = new ClipboardJS('#clipboard-btn', { text: function(trigger) { return trigger.getAttribute('data-text'); } }) + clipboard.on('success', function (e) { + $('#copy_msg').text('复制成功,ctrl+v粘贴即可'); + $('#clipboard-btn').hide(); + }); + + clipboard.on('error', function (e) { + $('#copy_msg').text('自动复制失败,请点击复制按钮'); + $('#clipboard-btn').show(); + }); + $('#submit').click(function () { var url = $(this).attr('url'); var query = $('.jssearch').find('input').serialize();