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();