推广平台->游戏管理--自动复制修改

master
chenxiaojun 5 years ago
parent ce86f56cc5
commit 324e880056

@ -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;
}
</style>
</block>
@ -260,13 +268,13 @@
<div class="game-window-content-eveyone" style="display: block;color: #3A97FF;font-size: 1.1rem;">
<label style="margin-right: 20px;">下载地址:</label>
<span id="game_link_address" style="word-wrap: break-word;white-space: normal;"></span>
<button id="clipboard-btn" style="display: none;" data-text="">复制</button>
</div>
</div>
<div class="game-window-content" style="text-align: center;width: auto;padding-top: 5px;">
<div class="game-window-content-eveyone" style="display: block;color: #999;font-size: 1.1rem;">
<span>复制成功,ctrl+v粘贴即可</span>
<span id="copy_msg">复制成功,ctrl+v粘贴即可</span>
<button class="clipboard-btn" id="clipboard-btn" style="display: none;" data-text="">复制</button>
</div>
</div>
@ -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();

Loading…
Cancel
Save